We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
zabbix_hostmacro_module: disable diff output of macro_type=secret
zabbix_hostmacro_module
community.zabbix.zabbix_hostmacro
ansible [core 2.13.13] config file = None configured module search path = ['/home/martin/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/local/lib/python3.10/dist-packages/ansible ansible collection location = /home/martin/.ansible/collections:/usr/share/ansible/collections executable location = /usr/local/bin/ansible python version = 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] jinja version = 3.1.3 libyaml = True
DEFAULT_CALLBACK_PLUGIN_PATH(/home/martin/ansible/test/ansible.cfg) = ['/home/martin/ansible/test/.callbacks'] DEFAULT_MANAGED_STR(/home/martin/ansible/test/ansible.cfg) = This file is managed by Ansible. DEFAULT_ROLES_PATH(/home/martin/ansible/test/ansible.cfg) = ['/home/martin/ansible/test/roles'] DEFAULT_STDOUT_CALLBACK(/home/martin/ansible/test/ansible.cfg) = anstomlog DEFAULT_TIMEOUT(/home/martin/ansible/test/ansible.cfg) = 30 DEFAULT_VAULT_PASSWORD_FILE(/home/martin/ansible/test/ansible.cfg) = /home/martin/ansible/test/.vault.pass DEPRECATION_WARNINGS(/home/martin/ansible/test/ansible.cfg) = True HOST_KEY_CHECKING(/home/martin/ansible/test/ansible.cfg) = False RETRY_FILES_ENABLED(/home/martin/ansible/test/ansible.cfg) = False
Just use zabbix_hostmacro_module
Task:
`host_vars`: ```yaml zabbix_host_macros: - name: '{$AWS.ACCESS.KEY.ID}' value: AKIAxyz - name: '{$AWS.SECRET.ACCESS.KEY}' value: abc123 type: secret
Run: ansible-playbook -i production/ zabbix_hostmacro.yml --diff --check
ansible-playbook -i production/ zabbix_hostmacro.yml --diff --check
'type': 'secret should by anonymized. Something like:
'type': 'secret
ok: [test.example.net -> localhost({{ zabbix_host_server_url }})] => (item={'name': '{$AWS.ACCESS.KEY.ID}', 'value': 'AKIAxyz'}) changed: [test.example.net -> localhost({{ zabbix_host_server_url }})] => (item={'name': '{$AWS.SECRET.ACCESS.KEY}', 'value': '***********************', 'type': 'secret'})
Output:
ok: [test.example.net -> localhost({{ zabbix_host_server_url }})] => (item={'name': '{$AWS.ACCESS.KEY.ID}', 'value': 'AKIAxxxxxxxxxxx'}) changed: [test.example.net -> localhost({{ zabbix_host_server_url }})] => (item={'name': '{$AWS.SECRET.ACCESS.KEY}', 'value': 'abc123', 'type': 'secret'})
The text was updated successfully, but these errors were encountered:
My task is:
- name: set host macros delegate_to: localhost community.zabbix.zabbix_hostmacro: host_name: "{{ inventory_hostname }}" macro_name: "{{ item.name }}" macro_value: "{{ item.value }}" macro_description: "{{ item.description | default('') | trim }}" macro_type: "{{ item.type | default('text') }}" state: "{{ item.state | default('present') }}" force: True with_items: "{{ zabbix_host_macros }}"
Sorry, something went wrong.
Hi, you can use no_log: true as an option
no_log: true
@leomuso yes, as hostfix. But I would like to non-secret diff output.
No branches or pull requests
SUMMARY
zabbix_hostmacro_module
: disable diff output of macro_type=secretISSUE TYPE
COMPONENT NAME
community.zabbix.zabbix_hostmacro
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT / Zabbix Version
STEPS TO REPRODUCE
Just use
zabbix_hostmacro_module
Task:
Run:
ansible-playbook -i production/ zabbix_hostmacro.yml --diff --check
EXPECTED RESULTS
'type': 'secret
should by anonymized. Something like:ACTUAL RESULTS
Output:
The text was updated successfully, but these errors were encountered: