-
Notifications
You must be signed in to change notification settings - Fork 15
Description
I'm unable to create an STG with ansible. I'm running as superadmin. Below is the error. Others work just fine but the STG for me doesn't work. Thoughtgs?
ryan@ANSIBLE-ISE:~/ansible_ise/create_stg$ ansible-playbook -i inventory.txt playbook_createstg.yml -vvv
ansible-playbook [core 2.13.3]
config file = /etc/ansible/ansible.cfg
configured module search path = ['/home/ryan/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /home/ryan/.local/lib/python3.10/site-packages/ansible
ansible collection location = /home/ryan/.ansible/collections:/usr/share/ansible/collections
executable location = /usr/bin/ansible-playbook
python version = 3.10.4 (main, Jun 29 2022, 12:14:53) [GCC 11.2.0]
jinja version = 3.1.2
libyaml = True
Using /etc/ansible/ansible.cfg as config file
host_list declined parsing /home/ryan/ansible_ise/create_stg/inventory.txt as it did not pass its verify_file() method
script declined parsing /home/ryan/ansible_ise/create_stg/inventory.txt as it did not pass its verify_file() method
auto declined parsing /home/ryan/ansible_ise/create_stg/inventory.txt as it did not pass its verify_file() method
yaml declined parsing /home/ryan/ansible_ise/create_stg/inventory.txt as it did not pass its verify_file() method
Parsed /home/ryan/ansible_ise/create_stg/inventory.txt inventory source with ini plugin
Skipping callback 'default', as we already have a stdout callback.
Skipping callback 'minimal', as we already have a stdout callback.
Skipping callback 'oneline', as we already have a stdout callback.
PLAYBOOK: playbook_createstg.yml *******************************************************************************************************************************************************************************************************************
1 plays in playbook_createstg.yml
Read vars_file 'credentials.yml'
Read vars_file 'credentials.yml'
Read vars_file 'credentials.yml'
PLAY [Create STG] **********************************************************************************************************************************************************************************************************************************
Read vars_file 'credentials.yml'
META: ran handlers
Read vars_file 'credentials.yml'
TASK [Create STG] **********************************************************************************************************************************************************************************************************************************
task path: /home/ryan/ansible_ise/create_stg/playbook_createstg.yml:8
The full traceback is:
Traceback (most recent call last):
File "/home/ryan/.local/lib/python3.10/site-packages/ciscoisesdk/restsession.py", line 523, in request
check_response_code(response, erc,
File "/home/ryan/.local/lib/python3.10/site-packages/ciscoisesdk/misc.py", line 62, in check_response_code
raise ApiError(response, **kwargs)
ciscoisesdk.exceptions.ApiError: [403] - The request is understood, but it has been refused or access is not allowed.
Check ApiError.additional_data for more info.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/ryan/.ansible/collections/ansible_collections/cisco/ise/plugins/plugin_utils/ise.py", line 207, in exec
response = func(**params)
File "/home/ryan/.local/lib/python3.10/site-packages/ciscoisesdk/api/v3_1_patch_1/security_groups.py", line 856, in create_security_group
_api_response = self._session.post(endpoint_full_url, params=_params,
File "/home/ryan/.local/lib/python3.10/site-packages/ciscoisesdk/restsession.py", line 643, in post
response = self.request('POST', url, erc, 0, params=params,
File "/home/ryan/.local/lib/python3.10/site-packages/ciscoisesdk/restsession.py", line 546, in request
return self.request(method, url, erc, 1, **kwargs)
File "/home/ryan/.local/lib/python3.10/site-packages/ciscoisesdk/restsession.py", line 523, in request
check_response_code(response, erc,
File "/home/ryan/.local/lib/python3.10/site-packages/ciscoisesdk/misc.py", line 62, in check_response_code
raise ApiError(response, **kwargs)
ciscoisesdk.exceptions.ApiError: [403] - The request is understood, but it has been refused or access is not allowed.
Check ApiError.additional_data for more info.
fatal: [10.10.10.20]: FAILED! => {
"changed": false,
"msg": "An error occured when executing operation. The error was: [403] - The request is understood, but it has been refused or access is not allowed.\nCheck ApiError.additional_data for more info.\n"
}
PLAY RECAP *****************************************************************************************************************************************************************************************************************************************
10.10.10.20 : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0