Skip to content

Commit

Permalink
Merge pull request #540 from konstruktoid/apttest
Browse files Browse the repository at this point in the history
add apt configuration verification
  • Loading branch information
konstruktoid authored Feb 13, 2024
2 parents 82fa9d9 + 115d142 commit 316987c
Showing 1 changed file with 14 additions and 0 deletions.
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

0 comments on commit 316987c

Please sign in to comment.