refactor!: switch hosts variables to a flat layout
This commit is contained in:
parent
f669dea62a
commit
779f2766f2
33 changed files with 270 additions and 322 deletions
|
@ -4,16 +4,11 @@
|
|||
gather_subset:
|
||||
- distribution
|
||||
|
||||
- name: '[setup] merge with custom vars'
|
||||
ansible.builtin.set_fact:
|
||||
security: "{{ security | combine(custom_security, recursive=recursive_combine) }}"
|
||||
changed_when: false
|
||||
|
||||
- include_tasks: firewall.yml
|
||||
|
||||
- name: '[apt] force HTTPS sources'
|
||||
become: true
|
||||
when: security.apt.force_https is truthy
|
||||
when: security_apt_force_https is truthy
|
||||
block:
|
||||
- name: '[apt] fetch apt information'
|
||||
ansible.builtin.command:
|
||||
|
@ -25,7 +20,7 @@
|
|||
path: "{{ item }}"
|
||||
regexp: 'http://'
|
||||
replace: 'https://'
|
||||
loop: "{{ apt_source_files.stdout_lines | difference(security.apt.https_ignore_list) }}"
|
||||
loop: "{{ apt_source_files.stdout_lines | difference(security_apt_https_ignore_list) }}"
|
||||
notify:
|
||||
- 'security : [apt] update sources'
|
||||
|
||||
|
@ -98,7 +93,7 @@
|
|||
block:
|
||||
- name: '[clamav] retrieve and install clamav package'
|
||||
ansible.builtin.apt:
|
||||
deb: https://www.clamav.net/downloads/production/clamav-{{ security.clamav.version }}.linux.x86_64.deb
|
||||
deb: https://www.clamav.net/downloads/production/clamav-{{ security_clamav_version }}.linux.x86_64.deb
|
||||
force_apt_get: true
|
||||
state: present
|
||||
- name: '[clamav] add clamav group'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue