[ansible-project] Re: frr_facts and/or frr_bgp give assertionError?

2019-06-26 Thread Piet Honkoop
Hi Jane, Thanks for the reply. Alas, it didn't work :) A bit more on the environment I'm working with: Got a lab setup with ubuntu 18.04 VMs with FRR 7.0 installed. What I want to test is whether I can properly configure frr on there with ansible. so the regular network_cli connection is likel

[ansible-project] List of files managed by ansible

2019-06-26 Thread Claudius Heine
Hi, I am quite new to Ansible and look forward to use it to manage some of our servers. We are a small company with only ~10 virtual servers hosting each a different service and have multiple admins for those. For us it does not make sense to port the configuration for every service to Ansible, j

[ansible-project] win_find not returning deduplicated files on share

2019-06-26 Thread Mark Benson
Hi all, I've been looking at the win_find module to get a list of .exe files from a Windows share but win_find is not returning the .exe files. The .exe files are deduplicated and looking at their properties in Windows explorer, they appear as: 'Size: 180MB' 'Size on disk: 0 bytes'. win_find

[ansible-project] Re: frr_facts and/or frr_bgp give assertionError?

2019-06-26 Thread Chiu Hsia Peng
Hi, I noticed there is no frr.py at lib/ansible/plugins/action. What's the ansible_network_os ? In my case (my customized network device, qnos) , I need add NETWORK_GROUP_MODULES: name: Network module families default: [..., qnos] In this case, my ansible_network_os=qnos And the socke

[ansible-project] Re: Ansible - overwriting file lineinfile when run in parallel

2019-06-26 Thread Josephsimon Arokiaraj
Hi All, Any update on this please? Cheers, Simon J On Tuesday, June 25, 2019 at 11:25:31 AM UTC+1, Josephsimon Arokiaraj wrote: > > Hi All, > > I am running the below code in a playbook which iterates over many hosts. > This script writes the value of ver.stdout to a file. I am seeing issue >

[ansible-project] Re: Ansible - overwriting file lineinfile when run in parallel

2019-06-26 Thread Josephsimon Arokiaraj
On Tuesday, June 25, 2019 at 11:25:31 AM UTC+1, Josephsimon Arokiaraj wrote: > > Hi All, > > I am running the below code in a playbook which iterates over many hosts. > This script writes the value of ver.stdout to a file. I am seeing issue > when I run in in parallel. It is overwriting. It wor

[ansible-project] Ansible - To limit the execution for the range of hosts

2019-06-26 Thread Preethi Muruganantham
Can you give me a suggestion about one more requirement? I need to limit the playbook execution for particular hosts. Eg., From host1 to the host mentioned in site.retry file My inventory file: 192.168.11.1 192.168.11.2 192.168.11.3 Playbook name: site.yml Command: ansible-playbook site.yml --l

[ansible-project] Re: Ansible - To limit the execution for the range of hosts

2019-06-26 Thread Preethi Muruganantham
Or is there any way in ansible to fetch the IP of the hosts where the playbooks are executed? As like .retry file in ansible which holds the IP of failed one, is there any ways in ansible which holds the IPs of all executed hosts alone(ie., hosts in which the playbook executes) On Wednesday, J

[ansible-project] Re: frr_facts and/or frr_bgp give assertionError?

2019-06-26 Thread Piet Honkoop
Hi, ansible_network_os is not set. As indicated: this is a ubuntu vm with frr installed in it, so ansible does not really recognize a network_os variant. so it might be that frr_bgp can only be used on certain device types? For now, I'm going to try another way of generating the proper confi

Re: [ansible-project] Re: frr_facts and/or frr_bgp give assertionError?

2019-06-26 Thread Ganesh Nalawade
Please try setting below variables in inventory file: ansible_network_os=frr ansible_connection=network_cli network_cli uses persistent connection and the value _socket_path is set after the connection with the remote host is successful in task_executor

Re: [ansible-project] Re: frr_facts and/or frr_bgp give assertionError?

2019-06-26 Thread Nilashish Chakraborty
Hello, For managing FRR using Ansible, you'd need to a have service account with the default shell set to /bin/vtysh on the VM/bare-metal server on which you've deployed FRR and use that service account credentials in your group_vars/host_vars. Essentially, if you SSH directly into your VMs using

[ansible-project] How to check when at least one element of a list is not null

2019-06-26 Thread jean-christophe manciot
The real goal here is to perform an action only when at least one of *inventory_hostname* groups from *group_names* matches one group from another list of groups (in this example: ```git|local|ntopng```) . This is defined within a *role*, so I cannot use the list ``` - hosts:```. For instance,

[ansible-project] Re: How to check when at least one element of a list is not null

2019-06-26 Thread flowerysong
On Wednesday, June 26, 2019 at 10:08:17 AM UTC-4, jean-christophe manciot wrote: > > The real goal here is to perform an action only when at least one of > *inventory_hostname* groups from *group_names* matches one group from > another list of groups (in this example: ```git|local|ntopng```) . >

[ansible-project] Re: Ansible - To limit the execution for the range of hosts

2019-06-26 Thread Tony Chia
You can get the current executing ip addresses in the playbook using the magic variable inventory_hostname You can find more information at https://docs.ansible.com/ansible/latest/user_guide/playbooks_variables.html#magic-variables-and-how-to-access-information-about-other-hosts On Wednesday,

[ansible-project] Re: Ansible - overwriting file lineinfile when run in parallel

2019-06-26 Thread Tony Chia
Since you are using local_action, it will execute on the ansible controller instead of remote host local_action is an alternative way of doing delegate_to: localhost. These actions will be executed on local machine (Ansible control host) I don't see how it would behave differently if you use ser

[ansible-project] Failed to find file, with shared vars

2019-06-26 Thread 'Michael Raugh - NOAA Affiliate' via Ansible Project
I am hoping to leverage the wisdom of the group here. For over a year, I have been running a playbook that starts out by pulling variables from a separate role: # Load required variables - import_role: name: sitevars tags: always Basically, that extracts the things that vary by site, lik

[ansible-project] ansible playbook in json format not working

2019-06-26 Thread Narahari 'n' Savitha
Hello Folkds: Thank you in advance for your time and attention. I wrote a playbook in the json format. [ > { > "name": "Test the json mode" > "hosts": "cool_columbus", > "tasks": [ > { > "name": "First task" > "shell": { > "chdir": "/tmp", >

Re: [ansible-project] ansible playbook in json format not working

2019-06-26 Thread Michael Mullay
Playbooks must be in yaml. Inventories can be in json (at least dynamic inventories require it), but not the playbooks themselves. On 6/26/19 3:08 PM, Narahari 'n' Savitha wrote: Hello Folkds: Thank you in advance for your time and attention. I wrote a playbook in the json format. [

Re: [ansible-project] ansible playbook in json format not working

2019-06-26 Thread James Cassell
On Wed, Jun 26, 2019, at 6:08 PM, Narahari 'n' Savitha wrote: > Hello Folkds: > > Thank you in advance for your time and attention. > > I wrote a playbook in the json format. > > > [ > > { > > "name": "Test the json mode" Missing a comma. > > "hosts": "cool_columbus", > > "tasks": [ > >

[ansible-project] Ansible Win_command

2019-06-26 Thread sindhu shree
Hi All, I need help in executing batch file which has some prompts. Am using following lines of script - name: run an executable with custom working dir win_command: pisrvstop.bat /argument1 "/argument 2 with space" args: chdir: F:\Program Files\PI\adm

Re: [ansible-project] ansible playbook in json format not working [Solved]

2019-06-26 Thread Narahari 'n' Savitha
Thank You James for pointing out the mistakes. I fixed them and now the json playbook works. On Wednesday, June 26, 2019 at 7:20:41 PM UTC-4, James Cassell wrote: > > > On Wed, Jun 26, 2019, at 6:08 PM, Narahari 'n' Savitha wrote: > > Hello Folkds: > > > > Thank you in advance for your time

Re: [ansible-project] ansible playbook in json format not working

2019-06-26 Thread Narahari 'n' Savitha
James pointed out the mistakes in the json and now it works. I am able to use json as valid format for playboks. On Wednesday, June 26, 2019 at 7:18:22 PM UTC-4, Michael M wrote: > > Playbooks must be in yaml. Inventories can be in json (at least dynamic > inventories require it), but not the pla

[ansible-project] Re: ansible playbook in json format not working [Solved]

2019-06-26 Thread Narahari 'n' Savitha
On Wednesday, June 26, 2019 at 6:08:25 PM UTC-4, Narahari 'n' Savitha wrote: > > Hello Folkds: > > Thank you in advance for your time and attention. > > I wrote a playbook in the json format. > > [ >> { >> "name": "Test the json mode"==> put , >> "hosts": "cool_columbus", >> "tasks"

[ansible-project] Ansible BigFix Patching

2019-06-26 Thread Samsir Muhammed
We use Ansible to build machines and perform the post task. Please share if we can trigger patching with Ansible and use BigFix as a patch repository solution. -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this gro

Re: [ansible-project] Ansible - overwriting file lineinfile when run in parallel

2019-06-26 Thread Kai Stian Olstad
On 25.06.2019 12:25, Josephsimon Arokiaraj wrote: Hi All, I am running the below code in a playbook which iterates over many hosts. This script writes the value of ver.stdout to a file. I am seeing issue when I run in in parallel. It is overwriting. It works good when serial:1 but it consume

[ansible-project] Synchronize from control machine to remote host not working

2019-06-26 Thread Gabriel Furstenheim
# SUMMARY # ISSUE TYPE - Bug Report / Issue workaround ``` - hosts: somehost tasks: - name: Synchronize synchronize: src: README.md dest: /tmp/ ``` # COMPONENT NAME synchronize # ANSIBLE VERSION ``` ansible 2.7.10 ``` # CONFIGURATION ```paste belo