Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PLAY [ios] ****************************************************************************************************************************************************************************************************************************************
- TASK [OBTAIN LOGIN CREDS] *************************************************************************************************************************************************************************************************************************
- ok: [172.26.26.10]
- TASK [DEFINE PROVIDER] ****************************************************************************************************************************************************************************************************************************
- ok: [172.26.26.10]
- TASK [LOAD NEW ACL INTO DEVICE] *******************************************************************************************************************************************************************************************************************
- An exception occurred during task execution. To see the full traceback, use -vvv. The error was: NameError: global name 'get_module' is not defined
- fatal: [172.26.26.10]: FAILED! => {"changed": false, "failed": true, "module_stderr": "Traceback (most recent call last):n File "/var/folders/yw/l2nj7vf50dqg2hrjw8qnp9b9vkc_p4/T/ansible_4xFueF/ansible_module_ios_config.py", line 224, in <module>n main()n File "/var/folders/yw/l2nj7vf50dqg2hrjw8qnp9b9vkc_p4/T/ansible_4xFueF/ansible_module_ios_config.py", line 177, in mainn module = get_module(argument_spec=argument_spec,nNameError: global name 'get_module' is not definedn", "module_stdout": "", "msg": "MODULE FAILURE", "rc": 0}
- to retry, use: --limit @/Users/rharp/Documents/Scripts/ansible/parents_playbook.retry
- PLAY RECAP ****************************************************************************************************************************************************************************************************************************************
- 172.26.26.10 : ok=2 changed=0 unreachable=0 failed=1
- ---
- - hosts: ios
- gather_facts: no
- connection: local
- tasks:
- - name: OBTAIN LOGIN CREDS
- include_vars: ~/Documents/Scripts/ansible/group_vars/all.yml
- - name: DEFINE PROVIDER
- set_fact:
- provider:
- host: "{{inventory_hostname}}"
- username: "{{ ansible_user }}"
- password: "{{ ansible_ssh_pass }}"
- - name: LOAD NEW ACL INTO DEVICE
- ios_config:
- provider: "{{ provider }}"
- parents: ip access-list extended ansible_test
- lines:
- - permit tcp host 10.1.1.1 any log
- - permit tcp host 10.1.1.2 any log
- - permit tcp host 10.1.1.3 any log
- - permit tcp host 10.1.1.4 any log
- - permit tcp host 1.1.1.1 any log
- - permit tcp host 2.2.2.2 any log
- before: no ip access-list extended ansible_test
- match: exact
- replace: line
- notify: save
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement