Skip to content

Commit 4ba1a08

Browse files
Elayaraja-Dhanapalyussufsh
authored andcommitted
Restart dropin configuration for squid and chrony
1 parent c74d732 commit 4ba1a08

4 files changed

Lines changed: 32 additions & 0 deletions

File tree

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[Service]
2+
Restart=always

playbooks/roles/ocp-config/handlers/main.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
service:
55
name: squid
66
state: restarted
7+
daemon_reload: yes
78
enabled: yes
89

910
- name: restart firewalld
@@ -16,4 +17,5 @@
1617
service:
1718
name: chronyd
1819
state: restarted
20+
daemon_reload: yes
1921
enabled: yes

playbooks/roles/ocp-config/tasks/chrony.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,17 @@
6262
- chronyconfig.allow[0] is defined
6363
notify:
6464
- restart chrony
65+
66+
- name: Create chrony dropin directory
67+
file:
68+
path: /etc/systemd/system/chronyd.service.d
69+
state: directory
70+
mode: 0755
71+
become: true
72+
73+
- name: Copy restart conf file to the chrony dropin directory
74+
copy:
75+
src: ../files/restart.conf
76+
dest: /etc/systemd/system/chronyd.service.d/restart.conf
77+
notify:
78+
- restart chrony

playbooks/roles/ocp-config/tasks/squid.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,17 @@
2828
- name: Set proxy details
2929
set_fact:
3030
squid_proxy_url: "http://{{ bastion_vip | default(ansible_host) }}:{{ squid_http_port }}"
31+
32+
- name: Create squid dropin directory
33+
file:
34+
path: /etc/systemd/system/squid.service.d
35+
state: directory
36+
mode: 0755
37+
become: true
38+
39+
- name: Copy restart conf file to the squid dropin directory
40+
copy:
41+
src: ../files/restart.conf
42+
dest: /etc/systemd/system/squid.service.d/restart.conf
43+
notify:
44+
- restart squid

0 commit comments

Comments
 (0)