-
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
Draft: feat: Add apache checklist #60
base: main
Are you sure you want to change the base?
Conversation
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.
Apart from my notes, please make sure that the ansible-lint pipeline is happy. Especially, make sure to always use FQCNs.
vars: | ||
taskid: 32-009 | ||
name: "Apache: Gather details, set vars: query systemd service for binary name being used" | ||
ansible.builtin.shell: "systemctl show -p ExecStart {{ apache_binary_name }} | grep 'ExecStart' | awk '{print $2}' | cut -d= -f2" |
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.
What do you achieve from this? Isn't the binary name already known? In fact, you are using the apache_binary_name
variable in this task already.
Or is this about whether or not to use the apachectl
wrapper?
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 do this to use the exact binary systemd is using by default..
In RedHat.yml or Debian.yml, apache_binary_name
is set to httpd or apache2, which will also be the systemd service name. (Maybe should rename it to include something related to systemd)
In the next task, I check if the systemd service was found, and if not, then the apachectl
pointed to by the shell is defaulted to
This is what we agreed to do(to assume apache is managed through systemd, in case there are multiple installs of it present), LMK if this is not necessary in your experience
taskid: 32-009 | ||
name: "Apache: Extract config path regexes from main apache config" | ||
ansible.builtin.shell: | ||
cmd: "grep -r '^Include' {{ apache_config_file_name }} | awk '{printf \"/etc/httpd/%s\\n\", $2}'" |
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.
Debian uses /etc/apache2
rather than /etc/httpd
. Other than that, I know of at least one system where we include config files from someplace other than /etc
.
taskid: 32-014 | ||
name: Test whether that certificate is valid in a month | ||
community.crypto.x509_certificate_info: | ||
path: "{{ item }}" |
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.
Does this also work for files containing multiple certs? Usually the certs come with a chain of intermediates, which should also be checked.
Co-authored-by: Sebastian P. <5564491+s3lph@users.noreply.github.com>
This is the first draft for the apache checklist.
Here, the checklist items are shown in blue, intermediate steps are shown in green.