diff --git a/prepare_host.yaml b/prepare_host.yaml index c129f43..17ded40 100644 --- a/prepare_host.yaml +++ b/prepare_host.yaml @@ -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: > diff --git a/roles/lxc_guest/tasks/main.yaml b/roles/lxc_guest/tasks/main.yaml index cae5946..2842ef9 100644 --- a/roles/lxc_guest/tasks/main.yaml +++ b/roles/lxc_guest/tasks/main.yaml @@ -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'