You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
613 B
23 lines
613 B
---
|
|
# This Playbook does utility stuff's like adding a webserver into the pool, etc..
|
|
|
|
- name: Remove the code from server
|
|
command: rm -rf /var/www/html/*
|
|
|
|
- name: Remove server from LB
|
|
lineinfile: dest=/etc/haproxy/haproxy.cfg state=absent regexp="${ansible_hostname}"
|
|
delegate_to: $item
|
|
with_items: ${groups.lbservers}
|
|
register: last_run
|
|
|
|
- name: disable the server in haproxy
|
|
shell: echo "disable server myapplb/${ansible_hostname}" | socat stdio /var/lib/haproxy/stats
|
|
delegate_to: $item
|
|
with_items: ${groups.lbservers}
|
|
|
|
- name: Remove the httpd package
|
|
yum: name=httpd state=absent
|
|
|
|
|
|
|
|
|
|
|