-
Notifications
You must be signed in to change notification settings - Fork 239
New issue
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
Refactor: Deprecate hash_passphrase filter in favor of snmp_hash #3470
Conversation
tested now, the documentation looks better now! for
for
don't we need to update https://github.com/aristanetworks/ansible-avd/blob/devel/ansible_collections/arista/avd/plugins/filter/snmp_hash.py#L153-L172 as well? |
Thanks @noredistribution - somehow one file did not make it. It is a wonder it was working .. |
Tested with - name: calculate snmp passphrase
hosts: localhost
connection: local
gather_facts: no
vars:
_input:
passphrase: arista
auth: sha256
engine_id: "424242424242424242"
tasks:
- name: "compute passphrase1"
tags: [snmp]
debug:
msg: "{{ _input }}"
- name: "compute passphrase"
tags: [snmp]
debug:
msg: "{{ _input | arista.avd.hash_passphrase }}"
- name: "compute passphrase"
tags: [snmp]
debug:
msg: "{{ _input | arista.avd.snmp_hash }}" output: ANSIBLE_COLLECTIONS_PATH=~/Github/gmuloc/ansible-avd ansible-playbook /tmp/test.yml
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'
PLAY [calculate snmp passphrase] *************************************************************************************************************************************************************************************
TASK [compute passphrase1] *******************************************************************************************************************************************************************************************
ok: [localhost] => {
"msg": {
"auth": "sha256",
"engine_id": "424242424242424242",
"passphrase": "arista"
}
}
TASK [compute passphrase] ********************************************************************************************************************************************************************************************
[DEPRECATION WARNING]: Use arista.avd.snmp_hash instead. This feature will be removed from arista.avd in version 5.0.0. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
ok: [localhost] => {
"msg": "00ab677fe6ac4f664fdb6098ca4b915b7de215487cb7d50e2491131a10dbb415"
}
TASK [compute passphrase] ********************************************************************************************************************************************************************************************
ok: [localhost] => {
"msg": "00ab677fe6ac4f664fdb6098ca4b915b7de215487cb7d50e2491131a10dbb415"
}
PLAY RECAP ***********************************************************************************************************************************************************************************************************
localhost : ok=3 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Change Summary
arista.avd.hash_passphrase
in favor ofarista.avd.snmp_hash
. Both will still work until AVD 5.0.0Related Issue(s)
Fixes #3468
Component(s) name
plugins
Proposed changes
Following the documentation here: https://docs.ansible.com/ansible/latest/dev_guide/module_lifecycle.html#renaming-a-module-or-plugin-in-a-collection-or-redirecting-a-module-or-plugin-to-another-collection
How to test
You can run
ansible-doc -t filter arista.avd.hash_passphrase
to see the deprecation warning lke:Checklist
User Checklist
Repository Checklist