Skip to content

Commit dbd5b0b

Browse files
committed
Ansibilize scripts-proxy deployment
1 parent 54a69ab commit dbd5b0b

File tree

3 files changed

+45
-2
lines changed

3 files changed

+45
-2
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
- name: restart scripts-proxy
2+
service:
3+
name: scripts-proxy
4+
state: restarted
5+
enabled: yes
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
- name: Disable haproxy-related services
3+
service:
4+
name: "{{ item }}"
5+
state: stopped
6+
enabled: no
7+
failed_when: no
8+
loop:
9+
- named-scripts-proxy
10+
- haproxy
11+
- name: Remove haproxy-related configuration
12+
file:
13+
path: "{{ item }}"
14+
state: absent
15+
loop:
16+
- /etc/named.scripts-proxy.conf
17+
- /etc/systemd/system/named-scripts-proxy.service
18+
- /etc/haproxy/haproxy.cfg
19+
- /etc/rsyslog.d/haproxy.conf
20+
- /etc/systemd/system/haproxy.service.d/10-scripts.conf
21+
- /usr/local/bin/hatop
22+
- name: Remove haproxy-related packages
23+
dnf:
24+
name:
25+
- bind
26+
- bind-dlz-ldap
27+
- haproxy
28+
state: absent
29+
- name: Install scripts-proxy
30+
dnf:
31+
name:
32+
- scripts-proxy
33+
state: present
34+
- name: Configure scripts-proxy
35+
copy:
36+
dest: /etc/sysconfig/scripts-proxy
37+
content: |
38+
OPTIONS="-ldap_servers={{ groups['scripts-ldap'] | join(':389,') }}:389"
39+
notify: restart scripts-proxy

ansible/scripts-proxy.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@
2323
- proxy-munin-node
2424
- nrpe
2525
- dnf-automatic
26-
- proxy-dns
27-
- proxy-haproxy
26+
- proxy-scripts-proxy
2827
- proxy-logrotate
2928
tasks:
3029
- package:

0 commit comments

Comments
 (0)