Re: [ansible-project] Ansible BigFix Patching

2019-06-27 Thread Dick Visser
The exact same question was posted 2 years ago on the bigfix forum, apparently with an elaborate answer: https://forum.bigfix.com/t/ansible-with-bigfix/19974 Dick On Thu, 27 Jun 2019 at 07:36, Samsir Muhammed wrote: > We use Ansible to build machines and perform the post task. Please share >

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

2019-06-27 Thread Preethi Muruganantham
Yes, I can get the current target host IP using "inventory_hostname". But the problem is I have to store that IP in a local file in my master machine (ie., where the ansible runs) On Wednesday, June 26, 2019 at 11:54:53 PM UTC+5:30, Tony Chia wrote: > > You can get the current executing ip addre

[ansible-project] problem to fetch value from var files

2019-06-27 Thread Eric Chang
I have a yml file named: client_hosts.yml it looks like below client_hosts: > abc.com: > - host: dc021 > ipv4: 192.168.11.21 > - host: dc022 > ipv4: 192.168.11.22 > - host: dc023 > ipv4: 192.168.11.23 > iuser: True > user: john > - host: dc024 > ipv4: 192.168.11.2

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

2019-06-27 Thread Piet Honkoop
Hi Nilashish, Thanks! Helps a few good steps, but I'm still running into a wall ;( Got this in group_vars/routers: ansible_network_os: frr ansible_connection: network_cli ansible_user: frradmin playbook router_config: --- - hosts: - routers gather_facts: false tasks: - name: get

[ansible-project] indice: "{{ indice|default([])|union(item.split(',')[0]|list) }}"

2019-06-27 Thread Ryad karkar
Hy all, I have a problem; I have this file clef_applicatives.csv: 3,rebesz,my_host,appli_1 10,reeesz,my_host2,appli_2 This task must return indice "3" or "10", when this task return 3 works perfectly but when i must return 10, i have indice = "1", "0" so i want to get "10" - set_fact:

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

2019-06-27 Thread Nilashish Chakraborty
Hi Piet, Could you try setting 'ansible_python_interpreter' value to point to the python executable on your controller node and check if it works? Refer: https://docs.ansible.com/ansible/latest/user_guide/intro_inventory.html (search for ansible_python_interpreter) Thanks! On Thu, Jun 27, 2019

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

2019-06-27 Thread Piet Honkoop
That does the trick! Thanks ;) Piet Op donderdag 27 juni 2019 11:41:36 UTC+2 schreef Nilashish Chakraborty: > > Hi Piet, > > Could you try setting 'ansible_python_interpreter' value to point to the > python executable on your controller node and check if it works? > > Refer: > https://docs.an

Re: [ansible-project] problem to fetch value from var files

2019-06-27 Thread Kai Stian Olstad
On 27.06.2019 11:17, Eric Chang wrote: - name: get user from yml debug: msg: "{{ ch['client_hosts']['abc.com']}}" ok: [dc053.abc.com] => { "msg": [ { "host": "dc026", "ipv4": "192.168.11.26", "iuser": "True", "user": [

[ansible-project] Ansible .ssh/authorized.key

2019-06-27 Thread Ryad karkar
Hy all, when i use become_user: wildfly i have have this message error : path /home/wildfly/.ssh/authorized_keys does not exist But this path exist in destination host... Someone have idea please ??! Thanks community ansible for your help !! ;) ansible version : 2.8 Regards, -- You receiv

Re: [ansible-project] Ansible .ssh/authorized.key

2019-06-27 Thread Vandana Thakur
May check permissions of authorized_keys On Thu, 27 Jun 2019 at 17:46, Ryad karkar wrote: > Hy all, > > when i use become_user: wildfly > > i have have this message error : > > path /home/wildfly/.ssh/authorized_keys does not exist > > But this path exist in destination host... > > Someone have

Re: [ansible-project] Ansible .ssh/authorized.key

2019-06-27 Thread Ryad karkar
Hy, Thanks for your answer, I look permission of authorized_keys but i use user wildfly of /home/wildfly/.ssh/authorized_keys So the problem is not if there is permission or not ?? I use : become_user: wildfly Thanks for your help !! Regards, Le jeudi 27 juin 2019 14:18:41 UTC+2, new_ansibl

Re: [ansible-project] Ansible .ssh/authorized.key

2019-06-27 Thread Ryad karkar
Hy, For answer, i have this permissions for authorized_keys with user wildfly : -rw--- 1 wildfly wildfly 7445 Jun 27 12:05 authorized_keys Thanks, Regards, Le jeudi 27 juin 2019 14:18:41 UTC+2, new_ansible a écrit : > > May check permissions of authorized_keys > > On Thu, 27 Jun 2019 at 17

RE: [ansible-project] Ansible .ssh/authorized.key

2019-06-27 Thread p.cook...@bham.ac.uk
Have you checked permissions on /home/wildfly/.ssh/ too? That needs to be 700 (rwx) – see eg below: [root@]# ls -ld /home/wildfly/.ssh drwx--. 2 wildfly wildfly 4096 Jun 7 14:26 /home/ wildfly /.ssh [root@]# Regards Phil From: ansible-project@googlegroups.com On Behalf Of ryad9200...@gma

Re: [ansible-project] Ansible .ssh/authorized.key

2019-06-27 Thread Ryad karkar
Hy, I check it and all is ok but not works... When i changed permission 777 it's works. I thinks that it's problem of user use ? but i have the well user ... with this command: become_user: wildfly Thinks, Regards, Le jeudi 27 juin 2019 15:12:19 UTC+2, p.co...@bham.ac.uk a écrit : > > Have

RE: [ansible-project] Ansible .ssh/authorized.key

2019-06-27 Thread p.cook...@bham.ac.uk
What task are you trying to perform eventually? If it’s something like adding a new package, you may need to connect with the normal wildfly user first and then become root. If so, something like similar might be more appropriate: - name: Test hosts: all remote_user: wildfly become: yes

Re: [ansible-project] Ansible .ssh/authorized.key

2019-06-27 Thread Ryad karkar
Hy, Thank you very much for your help i have solve this problem. Thanks for your help !! :) Regards, Le jeudi 27 juin 2019 17:23:47 UTC+2, p.co...@bham.ac.uk a écrit : > > What task are you trying to perform eventually? If it’s something like > adding a new package, you may need to connect wit

RE: [ansible-project] Ansible .ssh/authorized.key

2019-06-27 Thread p.cook...@bham.ac.uk
Did my suggestion work for you or did you resolve it in some other way? Regards Phil From: ansible-project@googlegroups.com On Behalf Of ryad9200...@gmail.com Sent: 27 June 2019 16:44 To: Ansible Project Subject: Re: [ansible-project] Ansible .ssh/authorized.key Hy, Thank you very much for y

[ansible-project] marker of module blockinfile

2019-06-27 Thread Ryad karkar
Hy, I don't understand why when i use marker only or marker_begin or marker_end, Ansible put all time on marker in the beginning *and* the end alo .. One exemple : - name: Inserer clepub dans authorized_key blockinfile: block: "{{ lookup('file', '{{ role_path }}/files/keys/{{ nom

[ansible-project] Issues with Python

2019-06-27 Thread MJP
Hello, I have a playbook that connects to vcenter and enables me to create VM's using a playbook. I just upgraded Ansible to 2.8 from 2.5 yesterday and now when i run this specific playbook, i get the following error: " "msg": "Failed to import the required Python library (requests)... Python

[ansible-project] How to move computer within OU in Active Directory

2019-06-27 Thread Stefano Leandro
Hi, I would to ask how to move computer within OU in Active Directory . Im thinking to use the module win_domain_computer like this : --- - name: Moving AD Computer into OU Testing hosts: all gather_facts: no tasks: - win_domain_computer: name: "{{ inventory_hostname }}"

[ansible-project] How can get a ansible output like a report for no technical audience

2019-06-27 Thread Stefano Leandro
Hi , I would you ask some suggestion how can get a ansible output like a report for no technical audience. I mean , the recap report is too ansible-operators ,the standardoutput is not coherent due to depends what are you running for ... So , i can get a report of execution and state about my

[ansible-project] How to rollback the ansible-playbook tasks ?

2019-06-27 Thread Stefano Leandro
Hi Folks, I would to ask some suggestions for controlling a state rollback of ansible-plyabook tasks . Are there some best practice to follow ? Thank you, Steano L. -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from th

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

2019-06-27 Thread jean-christophe manciot
[image: thumb-up.jpeg] -- 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-project+unsubscr...@googlegroups.com. To post to this group, send email to an

Re: [ansible-project] How can get a ansible output like a report for no technical audience

2019-06-27 Thread Kai Stian Olstad
On 27.06.2019 19:03, Stefano Leandro wrote: > Hi , > > I would you ask some suggestion how can get a ansible output like a report > for no technical audience. > > I mean , the recap report is too ansible-operators ,the standardoutput is > not coherent due to depends what are you running for ... >

[ansible-project] Re: Issues with Python

2019-06-27 Thread MJP
I figured it out, i needed to install requests and upgrade pyvomi On Thursday, June 27, 2019 at 12:26:35 PM UTC-4, MJP wrote: > > Hello, > > I have a playbook that connects to vcenter and enables me to create VM's > using a playbook. I just upgraded Ansible to 2.8 from 2.5 yesterday and > now w

Re: [ansible-project] Ansible Win_command

2019-06-27 Thread Angel Rengifo Cancino
May the expect module be useful for you? On Wed, Jun 26, 2019 at 11:32 PM sindhu shree wrote: > 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.b

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

2019-06-27 Thread Angel Rengifo Cancino
Just for curiosity, why are you using json instead of yaml? On Wed, Jun 26, 2019 at 11:33 PM Narahari 'n' Savitha wrote: > 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, Micha

Re: [ansible-project] How can get a ansible output like a report for no technical audience

2019-06-27 Thread Stefano Leandro
ty sir Il giorno giovedì 27 giugno 2019 11:17:39 UTC-6, Kai Stian Olstad ha scritto: > > On 27.06.2019 19:03, Stefano Leandro wrote: > > Hi , > > > > I would you ask some suggestion how can get a ansible output like a > report > > for no technical audience. > > > > I mean , the recap repor

[ansible-project] Open and Close WinRM shells with each task?

2019-06-27 Thread Tony Wyatt
We have noticed as we develop more and more complex plays that our Tower connections to inventory seem to be open/closed per task. Is this "by design"? What, if any, options can we specify to afford fewer WinRM sessions per task/play/role, etc? -T -- You received this message because you are

[ansible-project] Can lock_timeout be applied to a role that uses package module?

2019-06-27 Thread Scott Lundgren
If I'm calling the role newrelic.newrelic-infra that uses the package module , is there a way to set or override lock_timeout's default value of 0 ? Can you sug

Re: [ansible-project] Can lock_timeout be applied to a role that uses package module?

2019-06-27 Thread Matt Martz
By using `module_defaults` in a play, you can impact all uses of an underlying module. This can be done for `yum`, even if using the `package` module. https://docs.ansible.com/ansible/latest/user_guide/playbooks_module_defaults.html There is however a bug in Ansible 2.8 that prevents this from w

[ansible-project] Multiple tomcat service on same server with ports

2019-06-27 Thread Ajay Prajapati
Hi, I have multiple applications to run on multiple tomcat on Sami server.. I have playbook to install tomcat, I have to run the same playbook with different variables for ports Like for example var=8080, var=8090, etc Hope my question is understandable, Quick help will be helpful Regards, Ajay

Re: [ansible-project] Ansible Win_command

2019-06-27 Thread Jordan Borean
Ansible modules are designed to be run in a non-interactive fashion, you won't receive the prompt on the controller as that's just not how Ansible works. You also won't be able to use expect for Windows as that is a Python module. Your best bet is to the use stdin option for win_command to send

[ansible-project] Re: Open and Close WinRM shells with each task?

2019-06-27 Thread Jordan Borean
It is mostly by design as that's how the connection plugins are initialised. Each connection plugin is created post fork for each task executed which means we need to open a WinRM shell then close it for every task. We've been toying with the idea of connection persistence for a while but noth

Re: [ansible-project] Multiple tomcat service on same server with ports

2019-06-27 Thread Dick Visser
On Thu, 27 Jun 2019 at 22:16, Ajay Prajapati wrote: > > Hi, > I have multiple applications to run on multiple tomcat on Sami server.. I > have playbook to install tomcat, I have to run the same playbook with > different variables for ports > Like for example var=8080, var=8090, etc > > Hope my q

[ansible-project] Re: Multiple tomcat service on same server with ports

2019-06-27 Thread David McCheyne
I'm pretty sure you mean to ask "*DO* I need to run the same playbook with different variables for ports"? And it sounds like you've got a working play that acts on the port given to 'var'. If that's it, then yes that is your easiest solution without changing your code. Call the play once with e

[ansible-project] Help required for extracting Interface mac address

2019-06-27 Thread Rakesh Parida
Hi , My VM has 4 ip-interfaces . I want to extract a data as below using ansible. Interface1: macaddress Interface2: macaddress Interface3: macaddress Interface4: macaddress Kindly help. -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To un