Re: [ansible-project] Check status of VMware tools & reboot if VMware tools are not running

2020-04-20 Thread Dick Visser
You are using vmware_guest_info module, which was introduced in ansible 2.9: https://docs.ansible.com/ansible/latest/modules/vmware_guest_info_module.html On that page it also says that the module used to be called vmware_guest_facts prior to 2.9. Given that you have difficulty upgrading, try to

[ansible-project] How generate dynamic host file with only IP of concrete vendor (by MAC)

2020-04-20 Thread Michal Šiman
Hello to everybody. I would like run ansible playbook on all RPi (raspberry) in our network (at this moment we have around 300 pieces). All RPi have a IP dynamic from DHCP server. My idea is scann complete network found all live IP, get MAC of IP, filter only MAC with RPi vendor and from this I

[ansible-project] Relation between Ansible and SDN

2020-04-20 Thread nabil hama
Hello, Please, could explain to me, that is the relation between Ansible and SDN, how it can work together? with what architecture? thanks in advance BR -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and st

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

2020-04-20 Thread Dick Visser
That is a very generic question - can you be (a lot) more specific? On Mon, 20 Apr 2020 at 12:25, nabil hama wrote: > > Hello, > > Please, could explain to me, that is the relation between Ansible and SDN, > how it can work together? with what architecture? > > thanks in advance > > BR > > -- >

Re: [ansible-project] How generate dynamic host file with only IP of concrete vendor (by MAC)

2020-04-20 Thread Dick Visser
Take a look at https://docs.ansible.com/ansible/latest/plugins/inventory/nmap.html On Mon, 20 Apr 2020 at 11:56, Michal Šiman wrote: > > Hello to everybody. I would like run ansible playbook on all RPi (raspberry) > in our network (at this moment we have around 300 pieces). All RPi have a IP >

[ansible-project] How to define a register per server

2020-04-20 Thread דודו דודו
Hi, Have a task that disables Ipv6. The task should run only if the ipv6 folder exists. In order to implement the above, I have 2 tasks, the first task checks if a folder exists and saves the output to a register, the second task is to disable IPv6 and will run only if the register from the l

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

2020-04-20 Thread nabil hama
Le lundi 20 avril 2020 11:25:37 UTC+1, nabil hama a écrit : > > Hello, > > Thanks Dick for your feedback. > my question is as follow : I have confusion between the utilization of Ansible and SDN, As long as the SDN offers network automation, optimization and high flexibility, what is the

[ansible-project] Re: How generate dynamic host file with only IP of concrete vendor (by MAC)

2020-04-20 Thread David Foley
I'm using the following Playbook, which is taken the IP Address Entered from the Jenkins Pipeline: --- - name: Running Appened To Ansible Host File Playbook hosts: localhost connection: local tasks: - name: Adding The IP Address of the Newly Created Server to Ansible Host File

[ansible-project] win_regedit software restriction HKCU

2020-04-20 Thread Kumaresh kulal
I am working on win_regedit playbook to restrict software. So far the win_regedit playbook gets created for HKEY_LOCAL_MACHINE below is the playbook: --- - hosts: windows tasks: - name: Creating a registry win_regedit: path: HKLM:\SOFTWARE\Microsoft\Windows\CurrentVers

[ansible-project] How to create Multiple Guest Vms Snapshot

2020-04-20 Thread Arvind kumar
HI, I have Created a playbook to take a snapshot before patching of servers but this playbook has only one Guest_vm define so it working perfectly for me. *- name: Vmware guest snapshot create* * hosts: test-hypervisor* * tasks:* * - name: Create a snapshot* *vmware_guest_sna

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

2020-04-20 Thread Dick Visser
Hi To me this is still too generic. I'll leave it to someone else to answer. On Mon, 20 Apr 2020 at 13:44, nabil hama wrote: > > > > Le lundi 20 avril 2020 11:25:37 UTC+1, nabil hama a écrit : >> >> Hello, >> >> Thanks Dick for your feedback. > > > my question is as follow : > > I have confusion

[ansible-project] Re: Loop functionality is failing when i use add_host module inventory in other playbook

2020-04-20 Thread Suresh Karpurapu
I hope that it might be design of the add_host module. Is there any ways to disable the BYPASS_HOST_LOOP = True parameter in add_host module to enable the iteration or please suggest me if there any other ways to achieve my requirement Regards, Suresh On Friday, April 17, 2020 at 7:36:37 PM UT

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

2020-04-20 Thread Karl Auer
There is no relationship between Ansible and SDN. Ansible is a general tool. There may be Ansible modules that allow you to manipulate particular SDNs. I suggest you start by googling "Ansible SDN" and see where the journey takes you. Regards, K. On Mon, Apr 20, 2020 at 8:25 PM nabil hama wro

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

2020-04-20 Thread Karl Auer
Hullo Nabil. On Mon, 20 Apr 2020 at 13:44, nabil hama wrote:> > I have confusion between the utilization of Ansible and SDN, As long as > the SDN offers network automation, optimization and high flexibility, what is > the role of Ansible in that network? are two different subjects and work

[ansible-project] DNS Update (AD)

2020-04-20 Thread Renato Marcandier
Hello guys, I am trying to run a playbook that does the following situation: I want to update a current A record with a new IP address; if it doesn't exist, it will create a new A record. My current playbook does the following tasks: Check if the A record inside our DNS Manager exists.

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

2020-04-20 Thread nabil hama
Hello Karl, Effectively, I google it, I understood for Ansible but not the relation between it and SDN. Apart Cisco who talked about this topic, no other person talking about this subject. Many thanks for feedback, which very helpful for me. best regards Le lundi 20 avril 2020 14:09:04 UT

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

2020-04-20 Thread Albert Short
There are a number of vendors that use Ansible for SDN automation. Cisco as you mentioned for ACI & or traditional networking Cumulus Networks also uses Ansible If you wanted you could use it for NSX but vRa may help you there. There are git repositories, just need to know where to look :) On M

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

2020-04-20 Thread nabil hama
Hello Albert, Thanks a lot for your feedback. Please do know how it works (using Ansible for SDN automation)? if not, do you know where can I find this details? Thanks in advance BR Le lundi 20 avril 2020 15:36:20 UTC+1, Albert Short a écrit : > > There are a number of vendors that use Ansibl

Re: [ansible-project] DNS Update (AD)

2020-04-20 Thread Dick Visser
Doesn't the win_dns_record module just do everything already? Just one task and be done with it? On Mon, 20 Apr 2020 at 15:26, Renato Marcandier wrote: > Hello guys, > > > I am trying to run a playbook that does the following situation: > > > I want to update a current A record with a new IP

[ansible-project] I can read the key from KV but cannot pass it on as a private key.

2020-04-20 Thread Ali Shaik
At the time of running the playbook, ansible should be able to source the key from Azure Key Vault and use that key to log in to the hosts. With managed keys in KV it is possible to capture the key at the run time, but how do I pass that as an *ansible_ssh_private_key* - hosts: tested1

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' mod

[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, https://docs.ansible.com/ansible/latest/modules/tower_host_module.html

[ansible-project] Re: Help with a Windows target node

2020-04-20 Thread NoobSkywalker
Anyone able to help with this? I can provide any other information to aid in the debug if I've omitted anything ... On Tuesday, April 14, 2020 at 1:41:19 PM UTC-4, NoobSkywalker wrote: > > >

[ansible-project] Conditional Delegation to a host for synchronize module

2020-04-20 Thread Raj V
Hello, I am a newbie to Ansible and trying to figure out how to synchronize between 3 hosts based on condition. Below are details: There are 3 nodes and based on which node is primary (I was able to get a custom fact set for it) need to delegate to that host (which runs synchronize from that ho

Re: [ansible-project] yum repolist -v Output to Vars/Dict and use the data

2020-04-20 Thread Kai Stian Olstad
On Fri, Apr 17, 2020 at 12:59:09AM -0700, 'Spoonless' via Ansible Project wrote: > Hi again, > > Thanks for the tip in the right direction: > > I now have this: > > tasks: > - name: Set the required enabled repo information as facts > shell: "yum repolist -v | grep {{item}} | awk -F\

[ansible-project] Re: Concatenate strings using with_items and assign to a variable in Ansible

2020-04-20 Thread Harsh Agarwal
why dont you..concatenate strings to a list and then join the list instead to make the string? On Monday, March 20, 2017 at 11:02:39 AM UTC-4, charan@zemosolabs.com wrote: > > I need to save two 2 IPs to a variable in a vars_file when launching > ec2_instances, which are used later during

[ansible-project] How can I use the ip in a playbook when inventory has ansible_host

2020-04-20 Thread Scott Fella
Currently trying to see if there is a way I can grab the ip defined in the ansible_host and use that in a playbook. I know there is inventory_hostaname, but these for example are not in dns. hosts inventory example: [aireos] wlc2504-01 ansible_host=10.10.201.24 wlc2504-02 ansible_host=10.10.20

[ansible-project] fortigate backup cfg

2020-04-20 Thread Sandy Hung
Dear All: I have some problem, I ran ansible fortigate backup cfg it's file have in path but ansible have error msg { "msg": "Failed while reading configuration backup"} I don't know what happened This is my ansible --- - hosts: localhost gather_facts: no vars_files: - fortikey.yml ta

Re: [ansible-project] Concatenate strings using with_items and assign to a variable in Ansible

2020-04-20 Thread Dick Visser
Few things come to mind when looking at your code 1. Why are you using iptables? Security groups would take away a lot of problems especially the dynamics that you seem to working around with iptables. 2. If you need to restrict access between ec2 instances, why do you use public interfaces for c

Re: [ansible-project] How can I use the ip in a playbook when inventory has ansible_host

2020-04-20 Thread Dick Visser
Try 'ansible_host' On Tue, 21 Apr 2020 at 03:11, Scott Fella wrote: > Currently trying to see if there is a way I can grab the ip defined in the > ansible_host and use that in a playbook. I know there is > inventory_hostaname, but these for example are not in dns. > > hosts inventory example: >

Re: [ansible-project] How can I use the ip in a playbook when inventory has ansible_host

2020-04-20 Thread Dick Visser
From: https://docs.ansible.com/ansible/latest/reference_appendices/special_variables.html On Tue, 21 Apr 2020 at 06:47, Dick Visser wrote: > Try 'ansible_host' > > On Tue, 21 Apr 2020 at 03:11, Scott Fella wrote: > >> Currently trying to see if there is a way I can grab the ip defined in >> th

Re: [ansible-project] How can I use the ip in a playbook when inventory has ansible_host

2020-04-20 Thread Scott Fella
Thank you very much! I can't believe that I didn't scroll down that page far enough, basically was looking at the magic variables. -Scott On Monday, 20 April 2020 21:49:41 UTC-7, Dick Visser wrote: > > From: > > https://docs.ansible.com/ansible/latest/reference_appendices/special_variables.h

Re: [ansible-project] How can I use the ip in a playbook when inventory has ansible_host

2020-04-20 Thread Stefan Hornburg (Racke)
On 4/21/20 6:55 AM, Scott Fella wrote: > Thank you very much!  I can't believe that I didn't scroll down that page far > enough, basically was looking at the magic > variables.  > > -Scott Hello Scott, in fact ansible_host is a special variable, but any variable you stick on the host line will

Re: [ansible-project] telnet issue

2020-04-20 Thread Brian Coca
for telnet use 5 v's (-v) , 3 won't show anything about the task. -- -- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proj

Re: [ansible-project] How can I use the ip in a playbook when inventory has ansible_host

2020-04-20 Thread Scott Fella
Thanks for that info also. I will play around with that in the inventory or in the host_vars. That gives me more options I can use during a play. -Scott -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and sto

[ansible-project] Re: LDAP integration with ldap_entry module.

2020-04-20 Thread Javi Legido
Hi there. I strongly suggest first try to create the user by hand, to discard errors such as wrong domain and so on. Cheers. On Wednesday, April 3, 2019 at 10:16:13 AM UTC+2, Nikhil wrote: > > Hi, > > Am trying to interface with LDAP on Linux and creating a new user. if > uid doesn't exist,

[ansible-project] Failed to import the required Python library (python-ldap)

2020-04-20 Thread Javi Legido
Hi there. First of all many thanks to all the people involved in this project for their time. I'm facing an issue with ldap_entry, details here . Error message: > Failed to import the required Python library (python-ldap) on > remote_host's Py

Re: [ansible-project] How to create Multiple Guest Vms Snapshot

2020-04-20 Thread Abhijeet Kasurde
with_items is a task level parameter and not vmware_guest_snapshot parameter. To fix, you might want to match the indentation of with_items with delegate_to or register parameters. Please read https://docs.ansible.com/ansible/latest/user_guide/playbooks_loops.html#with-items On Mon, Apr 20, 2020

Re: [ansible-project] Failed to import the required Python library (python-ldap)

2020-04-20 Thread Stefan Hornburg (Racke)
On 4/21/20 7:20 AM, Javi Legido wrote: > Hi there. > > First of all many thanks to all the people involved in this project for their > time. > > I'm facing an issue with ldap_entry, details here > . Error message: > > > Failed to import the

[ansible-project] How to schedule a task which should be run after every 30 mins

2020-04-20 Thread Samir Kothawade
Hi, I want to execute specified task in ansible playbook after every 30 mins. Task is not just a command, so "at" module does not work in my case or may be I am not doing it in proper way : Here is my play book. Playbook below runs correctly for single time. I want to collect the stats after

Re: [ansible-project] Failed to import the required Python library (python-ldap)

2020-04-20 Thread Javi Legido
Good morning. Shame on me, I installed by mistake 'python-ldap'. I would swear that I had installed 'python3-ldap' Thanks a lot, that fixed my issue. On Tue, 21 Apr 2020 at 07:24, Stefan Hornburg (Racke) wrote: > On 4/21/20 7:20 AM, Javi Legido wrote: > > Hi there. > > > > First of all ma

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

2020-04-20 Thread Albert Short
Nabil, as Phil has mentioned, Ansible uses modules & depending which vendor's SDN solution you decide to use, you use the appropriate module. You can find quite a few Cisco ACI & MSO modules ofr Ansible 2.9 or like in Cumulus just 1 module. The closest you can get to a 'SDN' generic module wo

Re: [ansible-project] How to schedule a task which should be run after every 30 mins

2020-04-20 Thread Abhijeet Kasurde
How about writing a shell script with ansible-playbook command, and triggering that every 30 minutes using crontab. On Tue, Apr 21, 2020 at 11:02 AM Samir Kothawade wrote: > Hi, > > I want to execute specified task in ansible playbook after every 30 mins. > Task is not just a command, so "at" mo