Last active
January 3, 2019 09:34
-
-
Save richlv/852cd74f55f6f189134ee5370d338036 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
===== Variables: | |
action_common_keys: | |
server_url: "http://localhost/" | |
login_user: api_cli | |
login_password: "{{api_cli_password}}" | |
state: present | |
status: enabled | |
actions_discovery: | |
- name: "Send alerts to Admin" | |
event_source: 'trigger' | |
conditions: | |
- type: 'trigger_severity' | |
operator: '>=' | |
value: 'Information' | |
===== Task: | |
- name: Add Zabbix discovery actions | |
zabbix_action: | |
"{{ {{action_common_keys}} | combine({{item}}) }}" | |
loop: "{{actions_discovery}}" | |
===== Error | |
template error while templating string: expected token ':', got '}'. String: {{ {{action_common_keys}} | combine({{item}}) }} | |
===== Solution | |
Use module_defaults instead: https://docs.ansible.com/ansible/latest/user_guide/playbooks_module_defaults.html . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment