Jérémy Dubois
fe6235f8fb
- accounts : the user.yml task has a loop in a loop, var name need to be changed - base, kshrc : fix a previously deleted command on which is based the command that follows - base, ntp : do not display this task as a change, it only gets some information
32 lines
563 B
YAML
32 lines
563 B
YAML
---
|
|
- name: Retrieve ntpd.conf content
|
|
command: cat ntpd.conf
|
|
args:
|
|
chdir: /etc/
|
|
check_mode: no
|
|
changed_when: no
|
|
register: ntpd_conf
|
|
tags:
|
|
- ntp
|
|
|
|
- name: Empty ntpd.conf before customizing it
|
|
file:
|
|
path: /etc/ntpd.conf
|
|
state: absent
|
|
when: ntpd_conf.stdout is not regex("^server ntp.evolix.net$")
|
|
tags:
|
|
- ntp
|
|
|
|
- name: Customize ntpd conf
|
|
lineinfile:
|
|
path: /etc/ntpd.conf
|
|
line: "server {{ ntpd_servers }}"
|
|
create: yes
|
|
owner: root
|
|
group: wheel
|
|
mode: '0644'
|
|
notify:
|
|
- reload ntp
|
|
tags:
|
|
- ntp
|