[ansible-project] Running a dynamically generated playbook.

2020-01-13 Thread Anurag Negi
Hi, I have a requirement to run a dynamically generated playbook from a main playbook. The idea is to run only a main playbook which would be generating a sub-playbook and it would be run from one of the tasks in the main playbook. How do I achieve this ? -- You received this message because

Re: [ansible-project] Gathering Facts hangs when using become

2020-01-13 Thread Kai Stian Olstad
On 14.01.2020 00:46, Chris Thro wrote: Out of hundreds of hosts we have one host always hangs when gathering facts when using become. Create a playbook with the following: - hosts: all call the playbook with the -b flag The last thing reported in the log is "Escalation succeeded". No matter

[ansible-project] Re: specifying both inventory-file & group from that file

2020-01-13 Thread Sd Neil
+ James Cassell !! Thanks for your response-time and accuracy! Triple-points for guiding with 2 examples. PLAYBOOK: `hosts: "{{ target }}"` CLI: 'ansible-playbook -i ~ME/projects/ansible/hosts -e target= .yml -u -K --check --extra-vars "="' ...was what I tried first, and what succeeded

Re: [ansible-project] specifying both inventory-file & group from that file

2020-01-13 Thread James Cassell
On Tue, Jan 14, 2020, at 1:16 AM, Sd Neil wrote: > I work with a legacy 2.1 Ansible (mid-migration to 2.9). > > I have had success specifying my own private hosts (ini) file that > contains 2 Groups ( ' -i ' ). But I cannot find the 2.1 argument to > running a playbook (that has no hosts

[ansible-project] specifying both inventory-file & group from that file

2020-01-13 Thread Sd Neil
I work with a legacy 2.1 Ansible (mid-migration to 2.9). I have had success specifying my own private hosts (ini) file that contains 2 Groups ( ' -i ' ). But I cannot find the 2.1 argument to running a playbook (that has no hosts directive) against both, custom-inventory file and single-group

Re: [ansible-project] Gathering Facts hangs when using become

2020-01-13 Thread Jean-Yves LENHOF
Hi, Problems I already encounter : - NFS Stale - rpm database corruption - lock on lvm Regards, Jy Le 14 janvier 2020 00:46:56 GMT+01:00, Chris Thro a écrit : >Out of hundreds of hosts we have one host always hangs when gathering >facts >when using become. > >Create a playbook with the

[ansible-project] debug msg ignore other results.

2020-01-13 Thread Jegan A
Hello Team, I am iterating register result using debug and loop but it prints other variable result as well how to ignore that one while printing value which I want Below is the sample results. Cloud you please help me on this issues. I just want to print value of

[ansible-project] Gathering Facts hangs when using become

2020-01-13 Thread Chris Thro
Out of hundreds of hosts we have one host always hangs when gathering facts when using become. Create a playbook with the following: - hosts: all call the playbook with the -b flag The last thing reported in the log is "Escalation succeeded". No matter how long I wait it never returns the

Re: [ansible-project] Issue with redhat_subscription module

2020-01-13 Thread James Cassell
On Mon, Jan 13, 2020, at 2:18 PM, Adam Morris wrote: > I suspect that nobody else has run across this particular issue yet. > The redhat_subscription module has an error in it. If you are using > pool_ids then you can either provide a list of ids, or a list of ids > with quantities. Behind

[ansible-project] Re: Unable to git clone on Windows host via win_shell/win_command

2020-01-13 Thread Phong Pham
I'm using Enable-WSManCredSSP -Role Server -Force I'm able to use win_ping but git clone via Shell still got hang up... Any help is appreciated! On Monday, November 4, 2019 at 4:25:03 PM UTC-8, Benjamin Metzler wrote: > > Hi All, > I'm hitting a wall wrt to win_shell and a "git clone". I am

[ansible-project] Re: find windows directory name with version number

2020-01-13 Thread Jordan Borean
Paths are taken literally so it's trying to find the path `D:\Program-Files\nginx-*\'. So first you need to find the nginx folder then do a win_find in that folder for the nginx.conf file. -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To

[ansible-project] Issue with redhat_subscription module

2020-01-13 Thread Adam Morris
I suspect that nobody else has run across this particular issue yet. The redhat_subscription module has an error in it. If you are using pool_ids then you can either provide a list of ids, or a list of ids with quantities. Behind the scenes the module translates the former into the latter

[ansible-project] How to run compliance check using ansible playbooks

2020-01-13 Thread Gefela Gefela
I have a playbook that is designed to run a compliance on a firewall. However my knowledge of ansible does not extend to configuring variables and conditional statements .. This is my github site which has a yaml file used to run the compliance check https://github.com/gefela/ansible_junos

Re: [ansible-project] Create file who is in my csv file

2020-01-13 Thread Vladimir Botka
On Mon, 13 Jan 2020 08:10:14 -0800 (PST) Karther wrote: > filename,state,note,temps > file1,0,my fisrt note,52 > file2,0,my second note,34 > file3,0,my thirst note,71 > > ... my goal is that create all file sucessively (file1, file2, > file3, ...) You might be better off with the 'read_csv'

Re: [ansible-project] Re: How to configure prompt with 2 inputs

2020-01-13 Thread Uriel
I think the only thing missing from @Phil's answer is check_all: True On Monday, January 13, 2020 at 2:51:48 AM UTC-6, Srinivas Naram wrote: > > Thanks for our reply Phil. It did not work though. > > Any other suggestions ? > > On Fri, Jan 10, 2020 at 10:25 PM Phil Griffiths > wrote: > >> try

[ansible-project] Create file who is in my csv file

2020-01-13 Thread Karther
Hey all !! :) I have csv file with this content : filename,state,note,temps file1,0,my fisrt note,52 file2,0,my second note,34 file3,0,my thirst note,71 i have this task : - set_fact: csvfile: "{{ lookup('csvfile', 'file=/home/ansible/mssql_query/roles/files/csv_file.csv delimiter=,')

Re: [ansible-project] Ansible 2.7 hang during shell execution on PL/SQL

2020-01-13 Thread Brian Coca
open an issue in github. this sounds like unexpected consequence of changes to the shell module. -- -- 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,

Re: [ansible-project] Question: How to use the same host for multiple groups?

2020-01-13 Thread Brian Coca
using group_vars in vars_files is confusing as those are already loaded and might produce unintended consequences, what you really want is per play vars instead of inventory vars that relate to your application -- -- Brian Coca -- You received this message because you are subscribed

Re: [ansible-project] Question: How to use the same host for multiple groups?

2020-01-13 Thread Austin Wolfson
sorry, second host should be 'GroupB' in the playbook On Mon, Jan 13, 2020 at 10:21 AM Austin Wolfson wrote: > This is how i've been doing it (not sure if you can implement) > > inventory: > > [GroupA] > host1 > [GroupB] > host1 > > [Groups:children] . #throw all your vars that are the same for

Re: [ansible-project] Question: How to use the same host for multiple groups?

2020-01-13 Thread Austin Wolfson
This is how i've been doing it (not sure if you can implement) inventory: [GroupA] host1 [GroupB] host1 [Groups:children] . #throw all your vars that are the same for each group here GroupA GroupB - * make group_vars for each group name with specific variables and then calli in

Re: [ansible-project] calling action plugin

2020-01-13 Thread Brian Coca
no, modules are executed in their own environment, while action plugins are executed from within the controller code, it is a one way street. -- -- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from

Re: [ansible-project] Question: How to use the same host for multiple groups?

2020-01-13 Thread Konstantinos Tzevelekidis
Hello, This is what I did and it didn't work. Different groups mean different configuration for my application (that is the reason of such distinction), so if I use HostA under both groups, it doesn't do the deployment twice in the same host but only for the last one. Best Regards,

[ansible-project] calling action plugin

2020-01-13 Thread Punit Jain
Hi Team, I know module can be executed from action plugin, however is there a way to call action plugin from a module ? Regards, Punit -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails

Re: [ansible-project] How to use multiple filter in setup module

2020-01-13 Thread Brian Coca
FYI, filter does not prevent gathering of other facts, it just filters the result, running in loop gathers facts multiple times, it is much more efficient to gather 1 time and then extract the subset you desire. -- -- Brian Coca -- You received this message because you are subscribed

Re: [ansible-project] Question: How to use the same host for multiple groups?

2020-01-13 Thread Brian Coca
that is kind of like making 4 left turns to go straight, unsure why you would have the distinction in the first place, ... just use hostA throughout. -- -- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe

[ansible-project] New Relic Deployment

2020-01-13 Thread Garry Taylor
Hello, I have been using this module for several years now, to record a deployment in New Relic https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/monitoring/newrelic_deployment.py I now see on the New Relic website that a variable called 'timestamp' can now be used to record

[ansible-project] find windows directory name with version number

2020-01-13 Thread Arjan Goos
I want to "read" a directory name with a version number that can differ. This is my playbook: - name: Obtain information about a folder win_find: paths: ['D:\Program-Files\nginx-*\'] patterns: "nginx.conf" recurse: yes register: folder_info - name: info debug: var:

Re: [ansible-project] How to pass information/variable while creating VM on esxxi server using Vmware_guest module

2020-01-13 Thread Rohan Kalap
Can you please help in this module Or suggest modules which will be useful in this case. Please do the needful as i have to complete this task in given deadline. Thank you. On Monday, 13 January 2020 11:56:57 UTC+5:30, Rohan Kalap wrote: > > Thanks Abhijeet, > > I went through prompts document

Re: [ansible-project] Re: How to configure prompt with 2 inputs

2020-01-13 Thread Srinivas Naram
Thanks for our reply Phil. It did not work though. Any other suggestions ? On Fri, Jan 10, 2020 at 10:25 PM Phil Griffiths wrote: > try this? > > name: reboot ios device > cli_command: > command: reload > prompt: > - Save? > - confirm > answer: > - y >

Re: [ansible-project] Ansible: Debug and iteration

2020-01-13 Thread Vladimir Botka
On Sun, 12 Jan 2020 23:22:03 -0800 (PST) Jegan A wrote: > ... I like to get value of "lifecycle_state" using > debug. > >- debug: var="{{ item }}" > with_items: result_1.volume_attachments > > ok: [localhost] => (item=result_1.volume_attachments) => { >