Comments (11)
Hmm I've confirmed with multiple systems that your task is correct, it looks like for whatever reason your system isn't using the latest fix in this commit - eb6f443 - but you said you reinstalled the modules?
The only other thing I can think of is updating Ansible? I see you're using 2.5.1 which is supported but 2.9 is the latest version, this shouldn't matter but it wouldn't hurt to try.
from aruba-ansible-modules.
Hi wazzfi did you pull the repo to receive the commit eb6f443 and re-install the modules with the following command python aruba_module_installer.py --reinstall
?
from aruba-ansible-modules.
I ran the re-install and re-tested with the above config with the same result, unfortunately.
from aruba-ansible-modules.
Can you run the playbook in verbose mode and post the response? To run in verbose add -vvv to the end of your playbook CLI
from aruba-ansible-modules.
Also what are you trying to configure exactly? from the command it looks like you're trying to configure an NTP server host but you're also passing in the variable timesyncType?
from aruba-ansible-modules.
Just trying to configure a NTP server.
I removed all config so that it only did ntp_ip4addr and keyID
here is my output:
vast@vast-virtual-machine:~/aruba-ansible-modules/example_playbooks/arubaoss$ ansible-playbook test.yml -i PCN_Hosts.yml -vvv
ansible-playbook 2.5.1
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/home/vast/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python2.7/dist-packages/ansible
executable location = /usr/bin/ansible-playbook
python version = 2.7.15+ (default, Oct 7 2019, 17:39:04) [GCC 7.4.0]
Using /etc/ansible/ansible.cfg as config file
Parsed /home/vast/aruba-ansible-modules/example_playbooks/arubaoss/PCN_Hosts.yml inventory source with yaml plugin
PLAYBOOK: test.yml **************************************************************************************************************************************************************
1 plays in test.yml
PLAY [PCN] **********************************************************************************************************************************************************************
TASK [Gathering Facts] **********************************************************************************************************************************************************
task path: /home/vast/aruba-ansible-modules/example_playbooks/arubaoss/test.yml:2
Using module file /usr/lib/python2.7/dist-packages/ansible/modules/system/setup.py
<192.168.0.50> ESTABLISH LOCAL CONNECTION FOR USER: vast
<192.168.0.50> EXEC /bin/sh -c 'echo ~ && sleep 0'
<192.168.0.50> EXEC /bin/sh -c '( umask 77 && mkdir -p "echo /home/vast/.ansible/tmp/ansible-tmp-1575586880.66-29088999625686
" && echo ansible-tmp-1575586880.66-29088999625686="echo /home/vast/.ansible/tmp/ansible-tmp-1575586880.66-29088999625686
" ) && sleep 0'
<192.168.0.50> PUT /home/vast/.ansible/tmp/ansible-local-22363US_9C/tmp8TzGgD TO /home/vast/.ansible/tmp/ansible-tmp-1575586880.66-29088999625686/setup.py
<192.168.0.50> EXEC /bin/sh -c 'chmod u+x /home/vast/.ansible/tmp/ansible-tmp-1575586880.66-29088999625686/ /home/vast/.ansible/tmp/ansible-tmp-1575586880.66-29088999625686/setup.py && sleep 0'
<192.168.0.50> EXEC /bin/sh -c '/usr/bin/python /home/vast/.ansible/tmp/ansible-tmp-1575586880.66-29088999625686/setup.py && sleep 0'
<192.168.0.50> EXEC /bin/sh -c 'rm -f -r /home/vast/.ansible/tmp/ansible-tmp-1575586880.66-29088999625686/ > /dev/null 2>&1 && sleep 0'
ok: [switch1]
META: ran handlers
TASK [NTP] **********************************************************************************************************************************************************************
task path: /home/vast/aruba-ansible-modules/example_playbooks/arubaoss/test.yml:5
Using module file /usr/lib/python2.7/dist-packages/ansible/modules/network/arubaoss/arubaoss_ntp.py
<192.168.0.50> ESTABLISH LOCAL CONNECTION FOR USER: vast
<192.168.0.50> EXEC /bin/sh -c 'echo ~ && sleep 0'
<192.168.0.50> EXEC /bin/sh -c '( umask 77 && mkdir -p "echo /home/vast/.ansible/tmp/ansible-tmp-1575586882.23-179418647020854
" && echo ansible-tmp-1575586882.23-179418647020854="echo /home/vast/.ansible/tmp/ansible-tmp-1575586882.23-179418647020854
" ) && sleep 0'
<192.168.0.50> PUT /home/vast/.ansible/tmp/ansible-local-22363US_9C/tmpC3MItH TO /home/vast/.ansible/tmp/ansible-tmp-1575586882.23-179418647020854/arubaoss_ntp.py
<192.168.0.50> EXEC /bin/sh -c 'chmod u+x /home/vast/.ansible/tmp/ansible-tmp-1575586882.23-179418647020854/ /home/vast/.ansible/tmp/ansible-tmp-1575586882.23-179418647020854/arubaoss_ntp.py && sleep 0'
<192.168.0.50> EXEC /bin/sh -c '/usr/bin/python /home/vast/.ansible/tmp/ansible-tmp-1575586882.23-179418647020854/arubaoss_ntp.py && sleep 0'
<192.168.0.50> EXEC /bin/sh -c 'rm -f -r /home/vast/.ansible/tmp/ansible-tmp-1575586882.23-179418647020854/ > /dev/null 2>&1 && sleep 0'
ok: [switch1] => {
"changed": false,
"invocation": {
"module_args": {
"api_version": "v7.0",
"association_value": 8,
"authenticationMode": "md5",
"broadcast": true,
"burst": false,
"cmd_no_form": false,
"command": "config_ntp_ipv4addr",
"config": "create",
"host": "192.168.0.50",
"iburst": false,
"include_credentials_in_response": "ICS_ENABLED",
"keyId": 2,
"keyValue": "",
"maxpoll_value": 10,
"minpoll_value": 6,
"ntp_ip4addr": "10.150.17.10",
"password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"port": 80,
"provider": {
"api_version": null,
"host": "192.168.0.50",
"password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"port": 80,
"ssh_keyfile": null,
"timeout": 10,
"transport": "aossapi",
"use_proxy": false,
"use_ssl": false,
"username": "CLadmin",
"validate_certs": false
},
"sntp": false,
"ssh_keyfile": null,
"timeout": 10,
"timep": false,
"timepOrSntp": false,
"timesyncType": "ntp",
"trap_cmd_no_form": false,
"trap_value": "",
"trusted": true,
"unicast": false,
"use_ssl": false,
"username": "CLadmin",
"validate_certs": false
}
},
"msg": "Authentication key-id 2 needs to be configured to configure ipv4 server"
}
META: ran handlers
META: ran handlers
PLAY RECAP **********************************************************************************************************************************************************************
switch1 : ok=2 changed=0 unreachable=0 failed=0
from aruba-ansible-modules.
Is the authentication key-id 2 configured on your system? You don't need to configure key-id authentication on the NTP server if your environment doesn't require it
from aruba-ansible-modules.
I cut the config down to this to simplify.test:
-
hosts: PCN
tasks:- name: NTP Server configuration
arubaoss_ntp:
command: "config_ntp_ipv4addr"
config: "create"
ntp_ip4addr: "10.150.17.10"
- name: NTP Server configuration
And it still didnt work (create a NTP server) -- the output was as follows:
vast@vast-virtual-machine:~/aruba-ansible-modules/example_playbooks/arubaoss$ ansible-playbook test.yml -i PCN_Hosts.yml
PLAY [PCN] **********************************************************************************************************************************************************************
TASK [Gathering Facts] **********************************************************************************************************************************************************
ok: [switch1]
TASK [NTP Server configuration] *************************************************************************************************************************************************
ok: [switch1]
PLAY RECAP **********************************************************************************************************************************************************************
switch1 : ok=2 changed=0 unreachable=0 failed=0
vast@vast-virtual-machine:~/aruba-ansible-modules/example_playbooks/arubaoss$ ansible-playbook test.yml -i PCN_Hosts.yml -vvv
ansible-playbook 2.5.1
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/home/vast/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python2.7/dist-packages/ansible
executable location = /usr/bin/ansible-playbook
python version = 2.7.15+ (default, Oct 7 2019, 17:39:04) [GCC 7.4.0]
Using /etc/ansible/ansible.cfg as config file
Parsed /home/vast/aruba-ansible-modules/example_playbooks/arubaoss/PCN_Hosts.yml inventory source with yaml plugin
PLAYBOOK: test.yml **************************************************************************************************************************************************************
1 plays in test.yml
PLAY [PCN] **********************************************************************************************************************************************************************
TASK [Gathering Facts] **********************************************************************************************************************************************************
task path: /home/vast/aruba-ansible-modules/example_playbooks/arubaoss/test.yml:2
Using module file /usr/lib/python2.7/dist-packages/ansible/modules/system/setup.py
<192.168.0.50> ESTABLISH LOCAL CONNECTION FOR USER: vast
<192.168.0.50> EXEC /bin/sh -c 'echo ~ && sleep 0'
<192.168.0.50> EXEC /bin/sh -c '( umask 77 && mkdir -p "echo /home/vast/.ansible/tmp/ansible-tmp-1575695896.12-34413447889916
" && echo ansible-tmp-1575695896.12-34413447889916="echo /home/vast/.ansible/tmp/ansible-tmp-1575695896.12-34413447889916
" ) && sleep 0'
<192.168.0.50> PUT /home/vast/.ansible/tmp/ansible-local-4003vTWwqn/tmprgrJ5t TO /home/vast/.ansible/tmp/ansible-tmp-1575695896.12-34413447889916/setup.py
<192.168.0.50> EXEC /bin/sh -c 'chmod u+x /home/vast/.ansible/tmp/ansible-tmp-1575695896.12-34413447889916/ /home/vast/.ansible/tmp/ansible-tmp-1575695896.12-34413447889916/setup.py && sleep 0'
<192.168.0.50> EXEC /bin/sh -c '/usr/bin/python /home/vast/.ansible/tmp/ansible-tmp-1575695896.12-34413447889916/setup.py && sleep 0'
<192.168.0.50> EXEC /bin/sh -c 'rm -f -r /home/vast/.ansible/tmp/ansible-tmp-1575695896.12-34413447889916/ > /dev/null 2>&1 && sleep 0'
ok: [switch1]
META: ran handlers
TASK [NTP Server configuration] *************************************************************************************************************************************************
task path: /home/vast/aruba-ansible-modules/example_playbooks/arubaoss/test.yml:5
Using module file /usr/lib/python2.7/dist-packages/ansible/modules/network/arubaoss/arubaoss_ntp.py
<192.168.0.50> ESTABLISH LOCAL CONNECTION FOR USER: vast
<192.168.0.50> EXEC /bin/sh -c 'echo ~ && sleep 0'
<192.168.0.50> EXEC /bin/sh -c '( umask 77 && mkdir -p "echo /home/vast/.ansible/tmp/ansible-tmp-1575695897.64-131066937139889
" && echo ansible-tmp-1575695897.64-131066937139889="echo /home/vast/.ansible/tmp/ansible-tmp-1575695897.64-131066937139889
" ) && sleep 0'
<192.168.0.50> PUT /home/vast/.ansible/tmp/ansible-local-4003vTWwqn/tmpOdMJNV TO /home/vast/.ansible/tmp/ansible-tmp-1575695897.64-131066937139889/arubaoss_ntp.py
<192.168.0.50> EXEC /bin/sh -c 'chmod u+x /home/vast/.ansible/tmp/ansible-tmp-1575695897.64-131066937139889/ /home/vast/.ansible/tmp/ansible-tmp-1575695897.64-131066937139889/arubaoss_ntp.py && sleep 0'
<192.168.0.50> EXEC /bin/sh -c '/usr/bin/python /home/vast/.ansible/tmp/ansible-tmp-1575695897.64-131066937139889/arubaoss_ntp.py && sleep 0'
<192.168.0.50> EXEC /bin/sh -c 'rm -f -r /home/vast/.ansible/tmp/ansible-tmp-1575695897.64-131066937139889/ > /dev/null 2>&1 && sleep 0'
ok: [switch1] => {
"changed": false,
"invocation": {
"module_args": {
"api_version": "v7.0",
"association_value": 8,
"authenticationMode": "md5",
"broadcast": true,
"burst": false,
"cmd_no_form": false,
"command": "config_ntp_ipv4addr",
"config": "create",
"host": "192.168.0.50",
"iburst": false,
"include_credentials_in_response": "ICS_ENABLED",
"keyId": 1,
"keyValue": "",
"maxpoll_value": 10,
"minpoll_value": 6,
"ntp_ip4addr": "10.150.17.10",
"password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"port": 80,
"provider": {
"api_version": null,
"host": "192.168.0.50",
"password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"port": 80,
"ssh_keyfile": null,
"timeout": 10,
"transport": "aossapi",
"use_proxy": false,
"use_ssl": false,
"username": "CLadmin",
"validate_certs": false
},
"sntp": false,
"ssh_keyfile": null,
"timeout": 10,
"timep": false,
"timepOrSntp": false,
"timesyncType": "ntp",
"trap_cmd_no_form": false,
"trap_value": "",
"trusted": true,
"unicast": false,
"use_ssl": false,
"username": "CLadmin",
"validate_certs": false
}
},
"msg": "Authentication key-id 2 needs to be configured to configure ipv4 server"
}
META: ran handlers
META: ran handlers
PLAY RECAP **********************************************************************************************************************************************************************
switch1 : ok=2 changed=0 unreachable=0 failed=0
vast@vast-virtual-machine:~/aruba-ansible-modules/example_playbooks/arubaoss$
from aruba-ansible-modules.
Here is the output from my switch after running the script:
Aruba-2930F-24G-PoEP-4SFPP# show ntp servers
NTP Server Information
No NTP server configuration details found!
Aruba-2930F-24G-PoEP-4SFPP#
from aruba-ansible-modules.
Thank you so much! I'll give it a go.
from aruba-ansible-modules.
Verified issue with user was due to lack of executing 'git pull' before re-installing modules - closing issue
from aruba-ansible-modules.
Related Issues (20)
- [Errno 2] arubaoss_rest.py HOT 2
- "Connection failure: Remote end closed connection without response during login" HOT 9
- No output from **arubaoss_command:** when more tasks running in parallel HOT 8
- arubaoss_file_transfer upload firmware not working on all switch models HOT 2
- Can't install Aruba Ansible modules with Ansible 2.10+ HOT 4
- Modules not found even though they exist HOT 3
- allow installation of modules in 2.10.x HOT 3
- module doesn't upgrade all switches HOT 1
- Playbook Execution Failed During Ansible Testing with ArubaOS Switch HOT 2
- aruba_module_installer.py error /usr/lib/python3/dist-packages/ansible/plugins/doc_fragments does not exist on Debian Linux 10
- CONTRIBUTING.md "Aruba Bots Automate Videos" Playlist Link does not exist HOT 1
- Support for prompt in arubaoss_command HOT 1
- API call succeeds but is reported as failed HOT 5
- how to banner ansible HOT 2
- How to automate Cisco ios switch backup to tftp server using ansible HOT 1
- Error in "arubanetworks.aos_switch.arubaoss_vlan" documentation HOT 1
- arubaoss_facts error HOT 3
- Unable to backup to tftp HOT 1
- Stuck with : Request failed: <urlopen error [Errno -2] Name or service not known> HOT 12
- aruba-ansible module doesn't work HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aruba-ansible-modules.