Use independent fact to work around codename
This commit is contained in:
parent
69c037c136
commit
836c946c72
|
@ -15,6 +15,21 @@
|
|||
when: newhost_check.changed
|
||||
tags: always
|
||||
|
||||
#
|
||||
# Set codename
|
||||
#
|
||||
- name: set release codename (with ansible_distribution_release)
|
||||
set_fact:
|
||||
debian_codename: "{{ ansible_distribution_release }}"
|
||||
when: ansible_distribution_release is defined
|
||||
tags: always
|
||||
|
||||
- name: set release codename (with ansible_lsb)
|
||||
set_fact:
|
||||
debian_codename: "{{ ansible_lsb.codename }}"
|
||||
when: ansible_lsb.codename is defined
|
||||
tags: always
|
||||
|
||||
#
|
||||
# Remove obsolete issue-gen
|
||||
#
|
||||
|
@ -78,7 +93,7 @@
|
|||
with_items:
|
||||
- { src: "etc/apt/apt.conf.d/10norecommends.j2", dest: "/etc/apt/apt.conf.d/10norecommends" }
|
||||
- { src: "etc/apt/preferences.d/pins.j2", dest: "/etc/apt/preferences.d/pins" }
|
||||
- { src: "etc/apt/sources.list.{{ ansible_machine }}.{{ ansible_lsb.codename }}.j2", dest: "/etc/apt/sources.list" }
|
||||
- { src: "etc/apt/sources.list.{{ ansible_machine }}.{{ debian_codename }}.j2", dest: "/etc/apt/sources.list" }
|
||||
register: apt_config
|
||||
tags: base-apt
|
||||
|
||||
|
|
Loading…
Reference in New Issue