Skip to content

Commit

Permalink
Zabbix agents auto (#115)
Browse files Browse the repository at this point in the history
Install zabbix-agent during deployment when zabbix_agents is true
  • Loading branch information
k8soneill authored Mar 3, 2020
1 parent d9bcc96 commit be048a1
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions bastion-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,10 @@ parameters:
internet_gateway_ip:
type: string
description: Internet gateway for internal network
zabbix_agents:
type: string
description: Sets up zabbix agents on loadbalancers if defined
default: "false"

resources:
bastion_port:
Expand Down Expand Up @@ -344,6 +348,7 @@ resources:
__slack_webhook_url_acme_sh__ : { get_param: slack_webhook_url_acme_sh }
__ansible_vault_password__: { get_param: ansible_vault_password }
__internet_gateway_ip__: { get_param: internet_gateway_ip }
__zabbix_agents__: { get_param: zabbix_agents }
template: { get_file: 'files/setup_bastion.yaml' }
outputs:
- name: result
Expand Down
1 change: 1 addition & 0 deletions environment_example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,4 @@ parameter_defaults:
neustar_ultradns_password: "<neustar_ultradns_password>"
slack_webhook_url_acme_sh: "<Slack Webhook URL for acme.sh notifications>"
ansible_vault_password: '<Ansible Vault password>'
zabbix_agents: 'automatically sets up zabbix agents if this variable is true, defaults to false'
2 changes: 2 additions & 0 deletions files/setup_bastion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
slackWebhookUrlAcmeSh: __slack_webhook_url_acme_sh__
ansibleVaultPassword: __ansible_vault_password__
internetGatewayIp: __internet_gateway_ip__
zabbixAgents: __zabbix_agents__

tasks:
- name: Check if stack update or create and register variable
Expand Down Expand Up @@ -288,6 +289,7 @@
neustarUltraDnsUsername: {{ neustarUltraDnsUsername }}
neustarUltraDnsPassword: {{ neustarUltraDnsPassword }}
slackWebhookUrlAcmeSh: {{ slackWebhookUrlAcmeSh }}
zabbixAgents: {{ zabbixAgents }}
- name: Create Ansible vault password file
copy:
Expand Down
5 changes: 5 additions & 0 deletions top-level-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,10 @@ parameters:
ansible_vault_password:
type: string
description: Ansible Vault password for decrypting secrets
zabbix_agents:
type: string
description: Sets up zabbix agents on loadbalancers if defined
default: "false"

resources:
internal_network:
Expand Down Expand Up @@ -516,6 +520,7 @@ resources:
slack_webhook_url_acme_sh: { get_param: slack_webhook_url_acme_sh }
ansible_vault_password: { get_param: ansible_vault_password }
internet_gateway_ip: { get_param: [ network_config, gateway ] }
zabbix_agents: { get_param: zabbix_agents }

conditions:
multinetwork:
Expand Down

0 comments on commit be048a1

Please sign in to comment.