Use independent fact to work around codename
This commit is contained in:
parent
5c46bb0db7
commit
6104e0a5a5
|
@ -15,6 +15,21 @@
|
||||||
when: newhost_check.changed
|
when: newhost_check.changed
|
||||||
tags: always
|
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
|
# Remove obsolete issue-gen
|
||||||
#
|
#
|
||||||
|
@ -78,7 +93,7 @@
|
||||||
with_items:
|
with_items:
|
||||||
- { src: "etc/apt/apt.conf.d/10norecommends.j2", dest: "/etc/apt/apt.conf.d/10norecommends" }
|
- { 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/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
|
register: apt_config
|
||||||
tags: base-apt
|
tags: base-apt
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue