-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improvement GitHub Actions / Fix admin user existing #20
Conversation
…t_autoupdate Add updates from running pre-commit autoupdate
Replace Travis-CI with GitHub actions
…provement/actions
We are now have access to more state via actions
The user we delete is being recreated by cloud-init at boot.
Replaces users: - default with: users: []
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking swell- great work here @felddy. Please review my comments though before merging.
⚙️ ⚙️ ⚙️
@@ -67,7 +67,7 @@ repos: | |||
hooks: | |||
- id: black | |||
- repo: https://github.com/ansible/ansible-lint.git | |||
rev: v4.1.1a0 | |||
rev: 7a2221a32968f12bee8494caf978ce150ad1494f |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you open an issue to remind us to change this back to a release (when one becomes available)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going to backport this change up to skeleton-generic. I'll modify the issue that is up there: cisagov/skeleton-generic#19
DRYs out the code a bit, and removes the need to bump tools versions in all repos.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is some nice work. I like the transition to GitHub Actions and this is a good transition PR. Strong work @felddy 💪
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is strong work. I left a comment discussing how things could possibly be improved (DRYed) even further.
--time-cond "${CURL_CACHE_DIR}/${PACKER_ZIP}" --location \ | ||
"https://releases.hashicorp.com/packer/${PACKER_VERSION}/${PACKER_ZIP}" | ||
sudo unzip -o -d /usr/local/bin "${CURL_CACHE_DIR}/${PACKER_ZIP}" | ||
- name: Install Terraform |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could the install of packer and terraform be broken out into a separate repo a la what you did with cisagov/setup-env-github-action?
Seems maybe the Ansible role stuff could possibly be broken out as well, taking the list of role names as an input.
This PR addresses the following issues:
packer.json
file. Having separate workflows allows all variables to be adjusted, instead of relying on logic within the patcher script. With this flexibility we will be able to easily deploy pre-releases to a staging account (playground), and full releases to production.admin
user configured. This user is used by Packer. The user was persisting on to the final image with its ssh keys installed in bothadmin
androot
. At the end of image creation, this user is now deleted, its sudo privileges revoked, and its keys are removed fromroot
. (All keys are removed fromroot
.) Additionally, the cloud-init configuration is modified to prevent the user from being recreated at boot.