[ansible-project] only show run give error

2018-08-15 Thread nbctcp
Hi, I have working playbook to cisco on eve-ng. It will give error only when I want to run "show run". Other commands like "show version" "show clock" all ok Please help tq # cat showrun.yml --- - name: Run multiple commands connection: network_cli hosts: cisco1 gather_facts: true tasks:

[ansible-project] Understanding become_user Privilege Escalation

2018-08-15 Thread amruth
Hi All, I am trying to create a file in /opt folder. My playbook(from test role) looks like, --- > - name: create file > file: > path: /opt/testfile > state: touch > And main.yml looks like, --- > - hosts: '{{ host }}' > become: yes > become_method: sudo > become_user:

Re: [ansible-project] Warnings during ansible playbook run

2018-08-15 Thread Matt Martz
This warning exists when the yum plugin "rhnplugin" is installed and enabled on your system. As the message states, there is a bad interaction between rhnplugin and certificates. As a result, we use a slower means to perform some tasks. We add a warning to explain this situation. This was

Re: [ansible-project] Warnings during ansible playbook run

2018-08-15 Thread 'Chris Bidwell - NOAA Federal' via Ansible Project
I think it is because my ansible.cfg is set to: *stdout_callback = unixy* I was trying to get my ansible output to show a more human readable format instead of all this mess in the same line. ansible 2.6.2 config file = /etc/ansible/ansible.cfg configured module search path =

Re: [ansible-project] Warnings during ansible playbook run

2018-08-15 Thread Jonathan Lozada De La Matta
Chris, what ansible version and what are you trying to do ? I haven't seen it before. On Wed, Aug 15, 2018 at 12:42 PM 'Chris Bidwell - NOAA Federal' via Ansible Project wrote: > Have you guys seen this before? What is causing this: > > Warning: Due to potential bad behaviour with rhnplugin

[ansible-project] Warnings during ansible playbook run

2018-08-15 Thread 'Chris Bidwell - NOAA Federal' via Ansible Project
Have you guys seen this before? What is causing this: Warning: Due to potential bad behaviour with rhnplugin and certificates, used slower repoquery calls instead of Yum API. Thanks! -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To

[ansible-project] Re: Getting security bad md5 certificate after running configureRemotingForAnsible.ps1

2018-08-15 Thread Tony Chia
Have you tried remove the self-signed certified that is generated from configureRemotingForAnsible.ps1 and try running it again? Tony On Tuesday, August 14, 2018 at 9:35:00 AM UTC-7, ssh...@starbucks.com wrote: > > Perhaps the script has changed but I ran it 8 months ago off the > ansibledoc

[ansible-project] Unable to connect to Cisco IOS devices using network_cli - socket is closed error

2018-08-15 Thread Caleb Guerrero
Hello, I have been attempting to connect to various Cisco IOS devices in our dev environment with no luck using the network_cli connection method. I can communicate with all devices when running* 'ansible ios -m ping'* and setting the connection method to *'ansible_connection: local';* however

[ansible-project] Re: Editing inline encrypted variables?

2018-08-15 Thread Tony Chia
One solution to the inconvienince of changing the inline vault variable is to use prefix the vault variable with vault_ and store the actual secret data in a file. Then reference the vault variable with vault_xxx. This way when you can use ansible-vault edit/view etc but still make the variable

Re: [ansible-project] ansible.vault not working anymore?

2018-08-15 Thread Tony Chia
I would say a faster way is probably to setup a python virtualenv and see if you can reproduce the issue in the new clean virtual env. You can find instructions how to setup a python virutal env at https://docs.python-guide.org/dev/virtualenvs/ On Tuesday, August 14, 2018 at 11:40:04 AM UTC-7,

Re: [ansible-project] ansible.vault not working anymore?

2018-08-15 Thread Tony Chia
The current stable ansible version is 2.6.2 according to the github release page https://github.com/ansible/ansible/releases How did you get Ansible version 2.7.0? is the from the devel branch? On Tuesday, August 14, 2018 at 9:24:15 AM UTC-7, Vid Jelen wrote: > > My current python cryptography

[ansible-project] Re: Is it possible to pass SSH key contents as argument when running ansible-playbook

2018-08-15 Thread Tony Chia
According to this page it doesn't seem you have to store the key locally and replace it using an environment variable or an ansible variable https://docs.ansible.com/ansible/2.6/plugins/connection/ssh.html You can remove the key file after the playbook is finished There is another option where

[ansible-project] Is it possible to pass SSH key contents as argument when running ansible-playbook

2018-08-15 Thread Bruce Affonso
Hi, We are storing private keys in a DB and when we need to run a playbook would like to pass these SSH keys as an argument instead of storing as a file locally. I tried something like this: ansible-playbook -i "1.2.3.4," --extra-vars="ansible_user=username ansible_ssh_private_key_file=$KEY"

[ansible-project] Re: Use of vmware_guest module

2018-08-15 Thread Dimitri Yioulos
Further question: With the play written as follows: --- - hosts: localhost gather_facts: false vars: vsphere_host: 10.0.101.17 vsphere_username: user vsphere_password: password vm_state: poweredon #poweredon shutdownguest restarted tasks: - name: Boot VMWare Guest