GithubHelp home page GithubHelp logo

Comments (11)

tchiapuziowong avatar tchiapuziowong commented on June 14, 2024 1

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.

tchiapuziowong avatar tchiapuziowong commented on June 14, 2024

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.

wazzfi avatar wazzfi commented on June 14, 2024

I ran the re-install and re-tested with the above config with the same result, unfortunately.

from aruba-ansible-modules.

tchiapuziowong avatar tchiapuziowong commented on June 14, 2024

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.

tchiapuziowong avatar tchiapuziowong commented on June 14, 2024

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.

wazzfi avatar wazzfi commented on June 14, 2024

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.

tchiapuziowong avatar tchiapuziowong commented on June 14, 2024

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.

wazzfi avatar wazzfi commented on June 14, 2024

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"

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.

wazzfi avatar wazzfi commented on June 14, 2024

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.

wazzfi avatar wazzfi commented on June 14, 2024

Thank you so much! I'll give it a go.

from aruba-ansible-modules.

tchiapuziowong avatar tchiapuziowong commented on June 14, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.