Re: [ansible-project] How to send ansible tower metrics to prometheus

2021-04-19 Thread Phil Griffiths
Hi Ankit There should be a register option as well? If you use that you get access to the full back catalogue of recordings as well as mine. Regards Phil. On Mon, 22 Mar 2021 at 18:07, phil.gr...@gmail.com wrote: > You don't need a script this can all be done with Ansible - you should be >

Re: [ansible-project] Re: Command Not found but module is installed

2020-10-23 Thread Phil Griffiths
Hummm. I suggest you try the same mechanism with 1) a different module from the same collection and 2) a different collection On Fri, 23 Oct 2020 at 17:56, Fiend Busa wrote: > Im still getting the same error :( > > ERROR! couldn't resolve module/action 'arubaoss_command'. This often >

Re: [ansible-project] Re: Command Not found but module is installed

2020-10-22 Thread Phil Griffiths
Check file permissions? Also try ansible-doc -l | grep aruba to see if it can find those modules On Thu, 22 Oct 2020 at 18:10, Fiend Busa wrote: > Hey, > > Mine are all under: ~/.ansible/collections/ansible_collections > > ls -all in this directory gives me > > ansible > arubanetworks >

Re: [ansible-project] Re: Command Not found but module is installed

2020-10-22 Thread Phil Griffiths
I suggest you update ansible so you get support for list. It also has a verify option now as well so you’ll find it useful in these situations. On Thu, 22 Oct 2020 at 18:09, Fiend Busa wrote: > ansible-galaxy collection list doesn't work. No such argument list > On Thursday, October 22, 2020 at

Re: [ansible-project] Re: Command Not found but module is installed

2020-10-22 Thread Phil Griffiths
what does 'ansible-galaxy collection list' output? mine are under ~/.ansible/collections/ansible_collections what ansible version you on? I'm not convinced that collection is complete as some of those modules don't have docs that render for me using ansible-doc On Thu, 22 Oct 2020 at 15:10,

Re: [ansible-project] Re: Command Not found but module is installed

2020-10-21 Thread Phil Griffiths
Ok, so this is suggesting that it can't find it on the default collections path to me. Do you have an ansible.cfg with anything in it for collections and where did you install the collection? On Wed, 21 Oct 2020 at 21:10, Fiend Busa wrote: > Hey, > > I get the same error: > ERROR! couldn't

[ansible-project] Re: Playboox only runs the second time

2020-07-23 Thread Phil Griffiths
Hi Robert This doesn't make a whole lot of sense why this would fail and then work. Definitely being applied to the SAME host on each run? I suggest you post your whole playbook(s) here as there's something else going on outside the mentioned failing task I suspect. As a good measure I would

[ansible-project] Re: Ansible Remote Versioning

2020-07-23 Thread Phil Griffiths
Hi Firesh You are in danger of re-inventing the wheel here. As Jean-Yves points out, you are starting to negate the whole point of Ansibles idempotency. You write something once and no matter how many times you run it, it checks and only makes changes as necessary. Writing a timestamp to

[ansible-project] Re: REST API to add host to inventory for Ansible Tower is Not working!

2020-04-20 Thread Phil Griffiths
Hi Vivek As Stefan mentioned this list is not for AWX/Tower queries, BUT please take a look at either the tower-cli or awx-cli depending on your version and also the tower specific modules for doing such tasks. For instance,

Re: [ansible-project] Re: Relation between Ansible and SDN

2020-04-20 Thread Phil Griffiths
Nabil As with everything Ansible it comes down to the modules- this is a link to the complete list: https://docs.ansible.com/ansible/latest/modules/list_of_all_modules.html Have a look through there for anything SDN related for the solution you're looking for. There is no such generic 'sdn'

[ansible-project] Re: Is there a way we can delay the connection instead of unreachable

2020-04-07 Thread Phil Griffiths
This just sounds like a really bad idea! Having plays hanging around waiting for 20 days doesn't sound sensible. Why not just fail controllably after a number of retries perhaps? I use something like this to do this: ...tasks... register: output until: output is not failed retries: 3 On Monday,

[ansible-project] Re: Usage of ansible collection with ansible roles

2020-04-07 Thread Phil Griffiths
Hi Luca It's still early days for collections, so some things need ironing out, like https://github.com/ansible/ansible/issues/68198 [we'll have to see what happens here] You either need to use FQCNs (Fully Qualified Collection Names) or better still metadata - see

[ansible-project] Re: ansible cmdb? Whats the recommended way to store facts for later retrieval?

2020-04-01 Thread Phil Griffiths
Hi Dennis Does it have to be MySQL? The reason I ask, is that there are various cache plugins available: https://docs.ansible.com/ansible/latest/plugins/cache.html#plugin-list One such plugin is, for example, redis. You could use that and then the redis module:

Re: [ansible-project] Another Ansible Question

2020-03-16 Thread Phil Griffiths
Hi Michael You might want to check out ansible-runner: https://ansible-runner.readthedocs.io/en/latest/container.html There's also something like molecule which is designed for testing roles, and can be used with docker: https://molecule.readthedocs.io/en/latest/index.html If you want to see

Re: [ansible-project] Re: Ansible passwordless login not working

2020-01-22 Thread Phil Griffiths
I only removed the SSH key to remove pub key authentication from the router. As it’s the first authentication protocol used, the ansible command was ignoring the passed in username/password. It was for testing only. Your router config does pub key -> kbd interactive -> password authentication

Re: [ansible-project] Re: Ansible passwordless login not working

2020-01-21 Thread Phil Griffiths
I’ve tried a few connections: It seems that ansible_user is not honoured with the network_cli plugin so make sure you’re not using that still: $ ansible cisco -m ios_command -a "commands='sh ip int br'" -e 'ansible_connection=network_cli' -e 'ansible_network_os=ios' -e 'ansible_user=ansible'

[ansible-project] Re: Ansible passwordless login not working

2020-01-21 Thread Phil Griffiths
Have you tried setting remote_user? see https://docs.ansible.com/ansible/latest/plugins/connection/network_cli.html for details Also does the Cisco IOS device actually allow password authentication with SSH? You can check with something like: enable conf term ip ssh server authenticate user

Re: [ansible-project] Ansible passwordless login not working

2020-01-20 Thread Phil Griffiths
What happens when you setup your inventory to something like this: [all:vars]# these defaults can be overridden for any group in the [group:vars] sectionansible_connection=network_cliansible_user=ansible [ios]...

[ansible-project] Re: How to configure prompt with 2 inputs

2020-01-10 Thread Phil Griffiths
try this? name: reboot ios device cli_command: command: reload prompt: - Save? - confirm answer: - y - y On Friday, 10 January 2020 14:28:23 UTC, Srinivas Naram wrote: > > Hello Gurus > > I am working on ios_command module. This modules facilitates in

[ansible-project] Re: Create Multiple VMs on Azure

2019-11-21 Thread Phil Griffiths
This is for AWS but you can get the concept and apply using azure modules instead: https://github.com/ffirg/ansible/blob/master/vm_orchestration/offpremise/roles/offprem/tasks/amazon.yml Basically capture register output and then use add_host to create an in memory inventory to apply the rest