chore: migrate bare ansible_* facts to ansible_facts[] syntax
All checks were successful
ci/woodpecker/push/linting Pipeline was successful
All checks were successful
ci/woodpecker/push/linting Pipeline was successful
This commit is contained in:
parent
b759bea241
commit
2272aa6a58
23 changed files with 70 additions and 70 deletions
|
|
@ -8,14 +8,14 @@
|
|||
# configure legacy apt sources
|
||||
- name: "configure legacy apt sources"
|
||||
when: >
|
||||
(ansible_distribution == "Debian" and ansible_distribution_major_version | int <= 12) or
|
||||
(ansible_distribution == "Ubuntu" and ansible_distribution_major_version | int <= 23)
|
||||
(ansible_facts['distribution'] == "Debian" and ansible_facts['distribution_major_version'] | int <= 12) or
|
||||
(ansible_facts['distribution'] == "Ubuntu" and ansible_facts['distribution_major_version'] | int <= 23)
|
||||
block:
|
||||
|
||||
# configure apt sources
|
||||
- name: "apt - config - configure apt sources"
|
||||
ansible.builtin.template:
|
||||
src: "templates/apt/sources.d/{{ ansible_distribution | lower }}.sources.list.j2"
|
||||
src: "templates/apt/sources.d/{{ ansible_facts['distribution'] | lower }}.sources.list.j2"
|
||||
dest: "/etc/apt/sources.list"
|
||||
owner: "root"
|
||||
group: "root"
|
||||
|
|
@ -25,15 +25,15 @@
|
|||
# configure deb822 apt sources
|
||||
- name: "configure deb822 apt sources"
|
||||
when: >
|
||||
(ansible_distribution == "Debian" and ansible_distribution_major_version | int >= 13) or
|
||||
(ansible_distribution == "Ubuntu" and ansible_distribution_major_version | int >= 24)
|
||||
(ansible_facts['distribution'] == "Debian" and ansible_facts['distribution_major_version'] | int >= 13) or
|
||||
(ansible_facts['distribution'] == "Ubuntu" and ansible_facts['distribution_major_version'] | int >= 24)
|
||||
block:
|
||||
|
||||
# configure apt sources
|
||||
- name: "apt - config - configure apt sources"
|
||||
ansible.builtin.template:
|
||||
src: "templates/apt/sources.d/{{ ansible_distribution | lower }}.sources.j2"
|
||||
dest: "/etc/apt/sources.list.d/{{ ansible_distribution | lower }}.sources"
|
||||
src: "templates/apt/sources.d/{{ ansible_facts['distribution'] | lower }}.sources.j2"
|
||||
dest: "/etc/apt/sources.list.d/{{ ansible_facts['distribution'] | lower }}.sources"
|
||||
owner: "root"
|
||||
group: "root"
|
||||
mode: "0644"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue