Browse Source

roles/lxc and prepare host: apt autorefresh

python3
Zolfa 4 years ago
parent
commit
26097f8b44
Signed by: zolfa GPG Key ID: E1A43B038C4D6616
2 changed files with 24 additions and 0 deletions
  1. +11
    -0
      prepare_host.yaml
  2. +13
    -0
      roles/lxc_guest/tasks/main.yaml

+ 11
- 0
prepare_host.yaml View File

@ -70,6 +70,17 @@
regexp: '^\s*.+wipe_signatures_when_zeroing_new_lvs = '
notify: 'restart lvm'
- name: 'configure apt auto refresh'
lineinfile:
path: '/etc/apt/apt.conf.d/02periodic'
line: '{{ item.key }} "{{ item.value }}";'
regexp: '^{{ item.key }} '
create: true
loop:
- { key: 'APT::Periodic::Enable', value: '1' }
- { key: 'APT::Periodic::Update-Package-Lists', value: '1' }
- { key: 'APT::Periodic::Verbose', value: '2' }
- name: 'set monitoring max procs'
set_fact:
monitoring_facts: >


+ 13
- 0
roles/lxc_guest/tasks/main.yaml View File

@ -156,6 +156,19 @@
connection: 'ssh_lxc'
notify: 'restart container'
- name: 'update container apt config'
lineinfile:
path: '/etc/apt/apt.conf.d/02periodic'
line: '{{ item.key }} "{{ item.value }}";'
regexp: '^{{ item.key }} '
create: true
loop:
- { key: 'APT::Periodic::Enable', value: '1' }
- { key: 'APT::Periodic::Update-Package-Lists', value: '1' }
- { key: 'APT::Periodic::Verbose', value: '2' }
delegate_to: '{{ vm_name }}'
connection: 'ssh_lxc'
- meta: 'flush_handlers'
- name: 'MONITORING | add to monitored hosts'


Loading…
Cancel
Save