Skip to content

Commit 329ae33

Browse files
committed
moved the forced update of ntp to oneoff
1 parent bad5a17 commit 329ae33

3 files changed

Lines changed: 18 additions & 14 deletions

File tree

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
- hosts: all
3+
gather_facts: no
4+
tasks:
5+
6+
# pl test on test box
7+
- name: Froce ntp update
8+
sudo: yes
9+
shell:
10+
"service ntp stop && /usr/sbin/ntpdate pool.ntp.org && service ntp start"
Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
---
22
- hosts: all
33
gather_facts: no
4-
5-
- fail: msg="`name` needs to be defined for this role"
6-
when: name is not defined
7-
84
tasks:
9-
name : restart {{ name }}
10-
sudo: yes
11-
service:
12-
name={{ name }}
13-
state=restarted
5+
- fail: msg="`name` needs to be defined for this role"
6+
when: name is not defined
7+
8+
- name: restart {{ name }}
9+
sudo: yes
10+
service:
11+
name={{ name }}
12+
state=restarted

ansible/roles/package_ntp/handlers/main.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
11
---
2-
- name: Froce ntp update
3-
sudo: yes
4-
shell:
5-
"service ntp stop && /usr/sbin/ntpdate pool.ntp.org && service ntp start"
6-
72
- name: Start and Enable ntp
83
sudo: yes
94
service:

0 commit comments

Comments
 (0)