Fix conditional check of string variable
This commit is contained in:
parent
c90e626e3d
commit
fb98d53fad
2 changed files with 3 additions and 3 deletions
|
|
@ -5,14 +5,14 @@
|
|||
mode: '0644'
|
||||
content: >
|
||||
{{ apt_conf }}
|
||||
when: apt_conf | bool | default(false)
|
||||
when: apt_conf is defined and apt_conf is truthy
|
||||
|
||||
- name: Set NTP server
|
||||
ansible.builtin.lineinfile:
|
||||
path: /etc/systemd/timesyncd.conf
|
||||
insertafter: '^#NTP='
|
||||
line: NTP={{ ntp_serv }}
|
||||
when: ntp_serv | bool | default(false)
|
||||
when: ntp_serv is defined and ntp_serv is truthy
|
||||
|
||||
- name: Add proposed-updates repository
|
||||
ansible.builtin.apt_repository:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue