-
Notifications
You must be signed in to change notification settings - Fork 0
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
First commits for an Ansible role to install and configure systemd-resolved
#1
Conversation
3868f95
to
7b185bd
Compare
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.
Good stuff! 🚀
I noted naught but two small thangs.
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.
Looks pretty solid. I do have some feedback for your consideration.
165b5b5
to
df1e703
Compare
bb8a55d
to
8314ef7
Compare
… and Jammy These platforms do not provide systemd-resolved.
Docker bind mounts a file from the host to /etc/resolv.conf. This is inconvenient for us, since we need to create a symlink at /etc/resolv.conf. At the same time, we don't want to break DNS. The playbook being imported contains a workaround for this situation.
We must start the service to populate the files in /run/systemd/resolve/, before we can create the /etc/resolv.conf.
This functionality from pytest-testinfra is currently broken. See pytest-dev/pytest-testinfra#757 for more details. Once pytest-dev/pytest-testinfra#754 has been merged and a new release of pytest-testinfra is created the Service.exists line can be restored.
/run/systemd/resolve/stub-resolv.conf is a symlink to /run/systemd/resolve/resolv.conf in AL2023, so in this case the /etc/resolv.conf symlink resolves to the former not the latter.
For some reason ansible-lint does not know about the existence of ansible.posix.mount unless ansible itself is added as an extra dependency. I believe this is because ansible is not installed when ansible-lint is installed.
The comment explains why ansible must be added as an additional dependency for the ansible-lint linter. Co-authored-by: dav3r <[email protected]>
Co-authored-by: dav3r <[email protected]>
Note that this entails installing dnsutils in the Molecule prepare stage so that dig is available when the Molecule tests are run.
Co-authored-by: Nick <[email protected]>
Co-authored-by: Nick <[email protected]>
Co-authored-by: Nick <[email protected]>
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.
👍 👍
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.
LGTM ✔ Two minor feedback items for your consideration.
Co-authored-by: Nick <[email protected]>
…solved We can do this now that cisagov/ansible-role-systemd-resolved#1 has been approved and merged.
🗣 Description
This PR creates an Ansible role to install and configure
systemd-resolved
.💭 Motivation and context
This PR contributes to the resolution of cisagov/cool-system-internal#140 since, once this role is applied to our COOL AMIs, they will use the
systemd-resolved
stub DNS resolver.🧪 Testing
All automated tests pass.
✅ Pre-approval checklist