Skip to content

Commit be048a1

Browse files
authored
Zabbix agents auto (#115)
Install zabbix-agent during deployment when zabbix_agents is true
1 parent d9bcc96 commit be048a1

File tree

4 files changed

+13
-0
lines changed

4 files changed

+13
-0
lines changed

bastion-template.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,10 @@ parameters:
209209
internet_gateway_ip:
210210
type: string
211211
description: Internet gateway for internal network
212+
zabbix_agents:
213+
type: string
214+
description: Sets up zabbix agents on loadbalancers if defined
215+
default: "false"
212216

213217
resources:
214218
bastion_port:
@@ -344,6 +348,7 @@ resources:
344348
__slack_webhook_url_acme_sh__ : { get_param: slack_webhook_url_acme_sh }
345349
__ansible_vault_password__: { get_param: ansible_vault_password }
346350
__internet_gateway_ip__: { get_param: internet_gateway_ip }
351+
__zabbix_agents__: { get_param: zabbix_agents }
347352
template: { get_file: 'files/setup_bastion.yaml' }
348353
outputs:
349354
- name: result

environment_example.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,3 +87,4 @@ parameter_defaults:
8787
neustar_ultradns_password: "<neustar_ultradns_password>"
8888
slack_webhook_url_acme_sh: "<Slack Webhook URL for acme.sh notifications>"
8989
ansible_vault_password: '<Ansible Vault password>'
90+
zabbix_agents: 'automatically sets up zabbix agents if this variable is true, defaults to false'

files/setup_bastion.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868
slackWebhookUrlAcmeSh: __slack_webhook_url_acme_sh__
6969
ansibleVaultPassword: __ansible_vault_password__
7070
internetGatewayIp: __internet_gateway_ip__
71+
zabbixAgents: __zabbix_agents__
7172

7273
tasks:
7374
- name: Check if stack update or create and register variable
@@ -288,6 +289,7 @@
288289
neustarUltraDnsUsername: {{ neustarUltraDnsUsername }}
289290
neustarUltraDnsPassword: {{ neustarUltraDnsPassword }}
290291
slackWebhookUrlAcmeSh: {{ slackWebhookUrlAcmeSh }}
292+
zabbixAgents: {{ zabbixAgents }}
291293
292294
- name: Create Ansible vault password file
293295
copy:

top-level-template.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,10 @@ parameters:
198198
ansible_vault_password:
199199
type: string
200200
description: Ansible Vault password for decrypting secrets
201+
zabbix_agents:
202+
type: string
203+
description: Sets up zabbix agents on loadbalancers if defined
204+
default: "false"
201205

202206
resources:
203207
internal_network:
@@ -516,6 +520,7 @@ resources:
516520
slack_webhook_url_acme_sh: { get_param: slack_webhook_url_acme_sh }
517521
ansible_vault_password: { get_param: ansible_vault_password }
518522
internet_gateway_ip: { get_param: [ network_config, gateway ] }
523+
zabbix_agents: { get_param: zabbix_agents }
519524

520525
conditions:
521526
multinetwork:

0 commit comments

Comments
 (0)