File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,16 +2,19 @@ usage for rood/blauw deployment:
22
33an example playbook:
44
5+ ```
56---
67- name: Change loadbalancer state
78 hosts: loadbalancer_ha
89 become: false
910 gather_facts: false
1011 roles:
1112 - { role: haproxy_mgnt, tags: ['haproxy_mgnt'] }
13+ ```
1214
1315in group_vars set haproxy_applications:
1416
17+ ```
1518haproxy_applications:
1619
1720 - name: <APP>
@@ -20,12 +23,19 @@ haproxy_applications:
2023 ha_url: "/health"
2124 port: "{{ loadbalancing.engine.port }}"
2225 servers: "{{ docker_servers }}"
26+ ```
2327
2428and set servers, add a color label:
2529
30+ ```
2631docker_servers:
2732 - { ip: "<IPROOD>", label: "docker", color: "rood" }
2833 - { ip: "<IPBLAUW>", label: "docker", color: "blauw" }
34+ ```
2935
36+ run the playbook:
37+
38+ ```
3039ansible-playbook -i <INVENTORY> --tags haproxy_mgnt <PLAYBOOKNAME> -e "weight=<WEIGHT>" -e "app_name=<APP>" -e app_filter=color
31- -e "app_filtervalue=<COLOR >"
40+ -e "app_filtervalue=<COLOR>"
41+ ```
You can’t perform that action at this time.
0 commit comments