Skip to content
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

add apt configuration verification #540

Merged
merged 1 commit into from
Feb 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions molecule/default/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -813,6 +813,20 @@
when:
- ansible_os_family == "Debian"

- name: Verify apt settings
ansible.builtin.shell: |
set -o pipefail
apt-config dump | grep '^{{ item }}'
register: apt_config_settings
failed_when: apt_config_settings.rc != 0
changed_when: apt_config_settings.rc != 0
args:
executable: /bin/bash
when:
- ansible_os_family == "Debian"
with_items:
- "{{ apt_hardening_options }}"

- name: Efi fact
ansible.builtin.set_fact:
booted_with_efi: "{{ ansible_mounts | selectattr('mount', 'equalto', '/boot/efi') | list | length > 0 }}"
Expand Down
Loading