feat(o45): add configuration files for o45 host and update apt tasks for compatibility
This commit is contained in:
@@ -166,10 +166,10 @@
|
|||||||
- apt-configuration
|
- apt-configuration
|
||||||
|
|
||||||
- name: (apt.yml) apt update
|
- name: (apt.yml) apt update
|
||||||
ansible.builtin.apt:
|
ansible.builtin.command: apt-get update # noqa: command-instead-of-module
|
||||||
update_cache: true
|
|
||||||
cache_valid_time: "{{ 0 if common_apt_config_updated is defined and common_apt_config_updated.changed else apt_update_cache_valid_time }}"
|
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
environment:
|
||||||
|
DEBIAN_FRONTEND: noninteractive
|
||||||
when: apt_update|bool
|
when: apt_update|bool
|
||||||
tags:
|
tags:
|
||||||
- apt-update
|
- apt-update
|
||||||
|
|||||||
@@ -224,28 +224,20 @@
|
|||||||
tags:
|
tags:
|
||||||
- unattended-upgrades
|
- unattended-upgrades
|
||||||
|
|
||||||
- name: (basic.yml) check if /etc/apt/apt.conf.d/20auto-upgrades exists
|
- name: (basic.yml) configure auto-upgrades periodic settings
|
||||||
ansible.builtin.stat:
|
ansible.builtin.copy:
|
||||||
path: /etc/apt/apt.conf.d/20auto-upgrades
|
dest: /etc/apt/apt.conf.d/20auto-upgrades
|
||||||
register: common_ua_enabled
|
content: |
|
||||||
|
APT::Periodic::Update-Package-Lists "1";
|
||||||
|
APT::Periodic::Unattended-Upgrade "1";
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: "0644"
|
||||||
when:
|
when:
|
||||||
- ansible_facts['distribution'] == "Debian"
|
- ansible_facts['distribution'] == "Debian"
|
||||||
tags:
|
tags:
|
||||||
- unattended-upgrades
|
- unattended-upgrades
|
||||||
|
|
||||||
- name: (basic.yml) activate unattended upgrades
|
|
||||||
ansible.builtin.command:
|
|
||||||
cmd: dpkg-reconfigure -plow unattended-upgrades
|
|
||||||
creates: /etc/apt/apt.conf.d/20auto-upgrades
|
|
||||||
environment:
|
|
||||||
DEBIAN_FRONTEND: noninteractive
|
|
||||||
DEBCONF_NONINTERACTIVE_SEEN: "true"
|
|
||||||
when:
|
|
||||||
- ansible_facts['distribution'] == "Debian"
|
|
||||||
- not common_ua_enabled.stat.exists
|
|
||||||
tags:
|
|
||||||
- unattended-upgrades
|
|
||||||
|
|
||||||
- name: (basic.yml) copy apt-listchanges.conf
|
- name: (basic.yml) copy apt-listchanges.conf
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: etc/apt/listchanges.conf.j2
|
src: etc/apt/listchanges.conf.j2
|
||||||
|
|||||||
@@ -4,10 +4,10 @@
|
|||||||
# ---
|
# ---
|
||||||
|
|
||||||
- name: (caching-nameserver.yml) update
|
- name: (caching-nameserver.yml) update
|
||||||
ansible.builtin.apt:
|
ansible.builtin.command: apt-get update # noqa: command-instead-of-module
|
||||||
update_cache: true
|
|
||||||
cache_valid_time: "{{ 0 if common_apt_config_updated is defined and common_apt_config_updated.changed else apt_update_cache_valid_time }}"
|
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
environment:
|
||||||
|
DEBIAN_FRONTEND: noninteractive
|
||||||
when:
|
when:
|
||||||
- ansible_facts["distribution"] == "Debian"
|
- ansible_facts["distribution"] == "Debian"
|
||||||
- apt_update|bool
|
- apt_update|bool
|
||||||
|
|||||||
Reference in New Issue
Block a user