Haproxy shoudl reload on config update, adding celery task group, and allowing task servers to update inventory.

This commit is contained in:
Samuel Clay 2021-11-14 17:20:58 -05:00
parent b2a325f7e5
commit 38c2004479
4 changed files with 6 additions and 5 deletions

View file

@ -13,14 +13,14 @@ groups:
push: inventory_hostname.startswith('app-push')
blogs: inventory_hostname.startswith('blog')
work: inventory_hostname.startswith('task-work')
node: inventory_hostname.startswith('node')
node_socket: inventory_hostname.startswith('node-socket')
# debugs: inventory_hostname.startswith('debug')
task: inventory_hostname.startswith('task')
celery: inventory_hostname.startswith('task-celery')
work: inventory_hostname.startswith('task-work')
staging: inventory_hostname.startswith('staging')

View file

@ -41,6 +41,6 @@
- name: Reload haproxy
debug:
msg: Gracefully reloading HAProxy
when: updated_config and haproxy_verified.rc == 0
when: haproxy_verified.rc == 0
changed_when: yes
notify: reload haproxy

View file

@ -1,6 +1,7 @@
---
- name: SETUP -> app containers
hosts: web
serial: "50%"
vars_files:
- ../env_vars/base.yml
vars:

View file

@ -522,8 +522,8 @@ resource "digitalocean_droplet" "task-celery" {
size = var.droplet_size
ssh_keys = [digitalocean_ssh_key.default.fingerprint]
provisioner "local-exec" {
# command = "/srv/newsblur/ansible/utils/generate_inventory.py; sleep 120"
command = "sleep 120"
command = "/srv/newsblur/ansible/utils/generate_inventory.py; sleep 120"
# command = "sleep 120"
}
provisioner "local-exec" {
command = "cd ..; ansible-playbook -l ${self.name} ansible/playbooks/setup_root.yml"