File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed
ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/disable_gui/tasks Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change 2525 - desktop_installed.stat.exists
2626 - gui_disabled.stdout == ''
2727 tags : disable_gui
28+
29+ # Restart NTPD On Centos 7 after gui disablement
30+
31+ - name : Gather Facts About The Services Present
32+ service_facts :
33+ tags : disable_gui
34+
35+ - name : Check If NTPD Exists In The Service Facts
36+ set_fact :
37+ ntpd_entry_exists : " {{ 'ntpd.service' in services }}"
38+ when : ansible_facts.services is defined
39+ tags : disable_gui
40+
41+ - name : Set Fact Where NTPD Is Not Available As A Service
42+ set_fact :
43+ ntpd_entry_exists : " false"
44+ when : ansible_facts.services is not defined
45+ tags : disable_gui
46+
47+ - name : Start NTP for CentOS7 following GUI disablement
48+ service :
49+ name : ntpd
50+ state : restarted
51+ enabled : yes
52+ when :
53+ - ntpd_entry_exists | default(false) | bool
54+ - (ansible_distribution == "CentOS" and ansible_distribution_major_version == "7" )
55+ tags : disable_gui
You can’t perform that action at this time.
0 commit comments