Rename some roles to make ansible-lint happy.
This commit is contained in:
parent
4d791a65f1
commit
1db0b6ec31
75 changed files with 29 additions and 29 deletions
40
roles/aptcacher/tasks/main.yml
Normal file
40
roles/aptcacher/tasks/main.yml
Normal file
|
@ -0,0 +1,40 @@
|
|||
- name: install apt-cacher-ng package
|
||||
apt:
|
||||
name: apt-cacher-ng
|
||||
state: latest # noqa package-latest
|
||||
|
||||
- name: enable apt-cacher-ng for localhost
|
||||
copy:
|
||||
src: apt.conf
|
||||
dest: /etc/apt/apt.conf
|
||||
force: false
|
||||
mode: 0644
|
||||
notify: "start apt-cacher-ng"
|
||||
when: not run_in_installer|default(false)|bool ## do not enable apt-cacher during installation
|
||||
|
||||
- name: check if preseeded installer is available
|
||||
stat: path={{ tftp_root }}/d-i/{{ di_dist }}/preseed.cfg
|
||||
register: preseedcfg
|
||||
|
||||
- name: enable apt-cacher-ng for install-clients
|
||||
replace:
|
||||
dest: "{{ tftp_root }}/d-i/{{ di_dist }}/preseed.cfg"
|
||||
regexp: '^d-i mirror/http/proxy string$'
|
||||
replace: 'd-i mirror/http/proxy string http://{{ ansible_hostname }}:3142/'
|
||||
when: preseedcfg.stat.exists
|
||||
|
||||
- name: allow apt-cacher-ng service in firewalld
|
||||
firewalld:
|
||||
zone: internal
|
||||
port: 3142/tcp
|
||||
permanent: true
|
||||
immediate: true
|
||||
state: enabled
|
||||
when: not run_in_installer|default(false)|bool
|
||||
|
||||
- name: allow apt-cacher-ng service in firewalld, offline
|
||||
command: "firewall-offline-cmd --zone=internal --add-port=3142/tcp"
|
||||
when: run_in_installer|default(false)|bool
|
||||
|
||||
- name: flush handler to make apt-cacher available
|
||||
meta: flush_handlers
|
Loading…
Add table
Add a link
Reference in a new issue