[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

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

[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

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": [ > >

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. [

[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", >

[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,

[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

[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: 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] 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

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

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

[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

[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,

[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

[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

[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: 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

[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] 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,

[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

[ansible-project] Syntax for using variable-item-string in when statement

2019-06-26 Thread Ansar Sahit
I got this working. When : - " var + '-'+var2 +'-'+item " I have another problem now. Please assist. I have inventory variables like below : [Grp1] Host1 dblist='["sar","Cor",...] Host2 dblist='["db1","DB2","db3",...]' #dblist for every host is huge like some 20 items. Now for every