mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-09-18 21:50:56 +00:00
Haproxy shoudl reload on config update, adding celery task group, and allowing task servers to update inventory.
This commit is contained in:
parent
b2a325f7e5
commit
38c2004479
4 changed files with 6 additions and 5 deletions
|
@ -13,14 +13,14 @@ groups:
|
||||||
push: inventory_hostname.startswith('app-push')
|
push: inventory_hostname.startswith('app-push')
|
||||||
blogs: inventory_hostname.startswith('blog')
|
blogs: inventory_hostname.startswith('blog')
|
||||||
|
|
||||||
work: inventory_hostname.startswith('task-work')
|
|
||||||
|
|
||||||
node: inventory_hostname.startswith('node')
|
node: inventory_hostname.startswith('node')
|
||||||
node_socket: inventory_hostname.startswith('node-socket')
|
node_socket: inventory_hostname.startswith('node-socket')
|
||||||
|
|
||||||
# debugs: inventory_hostname.startswith('debug')
|
# debugs: inventory_hostname.startswith('debug')
|
||||||
|
|
||||||
task: inventory_hostname.startswith('task')
|
task: inventory_hostname.startswith('task')
|
||||||
|
celery: inventory_hostname.startswith('task-celery')
|
||||||
|
work: inventory_hostname.startswith('task-work')
|
||||||
|
|
||||||
staging: inventory_hostname.startswith('staging')
|
staging: inventory_hostname.startswith('staging')
|
||||||
|
|
||||||
|
|
|
@ -41,6 +41,6 @@
|
||||||
- name: Reload haproxy
|
- name: Reload haproxy
|
||||||
debug:
|
debug:
|
||||||
msg: Gracefully reloading HAProxy
|
msg: Gracefully reloading HAProxy
|
||||||
when: updated_config and haproxy_verified.rc == 0
|
when: haproxy_verified.rc == 0
|
||||||
changed_when: yes
|
changed_when: yes
|
||||||
notify: reload haproxy
|
notify: reload haproxy
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
---
|
---
|
||||||
- name: SETUP -> app containers
|
- name: SETUP -> app containers
|
||||||
hosts: web
|
hosts: web
|
||||||
|
serial: "50%"
|
||||||
vars_files:
|
vars_files:
|
||||||
- ../env_vars/base.yml
|
- ../env_vars/base.yml
|
||||||
vars:
|
vars:
|
||||||
|
|
|
@ -522,8 +522,8 @@ resource "digitalocean_droplet" "task-celery" {
|
||||||
size = var.droplet_size
|
size = var.droplet_size
|
||||||
ssh_keys = [digitalocean_ssh_key.default.fingerprint]
|
ssh_keys = [digitalocean_ssh_key.default.fingerprint]
|
||||||
provisioner "local-exec" {
|
provisioner "local-exec" {
|
||||||
# command = "/srv/newsblur/ansible/utils/generate_inventory.py; sleep 120"
|
command = "/srv/newsblur/ansible/utils/generate_inventory.py; sleep 120"
|
||||||
command = "sleep 120"
|
# command = "sleep 120"
|
||||||
}
|
}
|
||||||
provisioner "local-exec" {
|
provisioner "local-exec" {
|
||||||
command = "cd ..; ansible-playbook -l ${self.name} ansible/playbooks/setup_root.yml"
|
command = "cd ..; ansible-playbook -l ${self.name} ansible/playbooks/setup_root.yml"
|
||||||
|
|
Loading…
Add table
Reference in a new issue