[ansible-project] dynamic load yaml using include_vars and use these vars later

2020-02-13 Thread Eric Chang
I have dozens of yaml files , and I want to use these yaml files as vars in playbook. so I try to dynamic load vars like aaa.yaml , bbb.yaml,ccc.yaml - name: get all yaml files name shell: find /home/yaml -name *.yamlawk -F "/" '{print $6}'|awk -F "." '{print $1}' register: yaml_files

[ansible-project] unable to use a remote node file in uri module

2020-02-13 Thread Vishal Bobade
Hi, below is my task where in the "body" section in the below task - I am currently using a file and it is throwing error (I actually check the location file is present there) when I am trying to run a jenkins job. [1;35m[WARNING]: Unable to find 'include/Browsers-CollectionDB.json' in

Re: [ansible-project] Why does include/import_role require a name argument?

2020-02-13 Thread M Alegre
I see. Well, at least the plan is for it to be consistent! It was the inconsistency that was bugging me more than anything. On Thursday, February 13, 2020 at 4:20:55 PM UTC-6, Matt Martz wrote: > > Supporting what we call raw params, so that you don't need `name` makes it > technically more

[ansible-project] Re: Ansible Meta resetconnection

2020-02-13 Thread 林博仁
Similar problem: meta: reset_connection not working on Ansible 2.9.1 · Issue #66414 · ansible/ansible -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop

[ansible-project] Docker container is not starting on ubuntu 18.0 ver for ansible. Any idea?

2020-02-13 Thread Work-Hard
Docker container is not starting on ubuntu 18.0 ver for ansible. *Any idea?* *TASK [local_docker : Start the containers] fatal: [localhost]: FAILED!

Re: [ansible-project] Why does include/import_role require a name argument?

2020-02-13 Thread Matt Martz
Supporting what we call raw params, so that you don't need `name` makes it technically more complicated for the module to accept other args. Such as `defaults_from`. In general we are moving away from those things which just accept a simple string value. We already started this with

[ansible-project] Why does include/import_role require a name argument?

2020-02-13 Thread M Alegre
Hello, I know this is a relatively frivolous concern, but it's really bugging me. If I want to import a playbook foo.yml I can just pass it directly: ``` - include_playbook: foo.yml ``` Similarly with tasks: ``` tasks: - include_tasks: foo.yml ``` However, if I want to import a role named

Re: [ansible-project] Re: KEY: VALUE iterations

2020-02-13 Thread Vladimir Botka
On Thu, 13 Feb 2020 13:33:32 -0800 (PST) Anand Solomon wrote: > - name: Display the query results > debug: > msg: "{{query_result.msg}} > > I get the below > "msg": "All items completed" > > I couldn't get the below, what ever I put in my debug statement. Is there > is

[ansible-project] How to build Ansible inventory file

2020-02-13 Thread Xinhuan Zheng
Hello, I need to build Ansible inventory files, but somehow got stuck. Typically for a service, there is development, staging and production. Initially, I thought I can create 3 inventory files with those names. Later I feel it may not be the case. As I look at this Ansible document:

Re: [ansible-project] Re: KEY: VALUE iterations

2020-02-13 Thread Anand Solomon
Thank you so very much Vlado if I say - name: Display the query results debug: msg: "{{query_result.msg}} I get the below "msg": "All items completed" I couldn't get the below, what ever I put in my debug statement. Is there is something I should do in order to get the

Re: [ansible-project] Re: KEY: VALUE iterations

2020-02-13 Thread Vladimir Botka
There is nothing to parse. The result is a dictionary with the attributes listed in "msg". Simply access the attributes of the dictionary to "take the values". On Thu, 13 Feb 2020 11:52:30 -0800 (PST) Anand Solomon wrote: > I want to parse the json output and take the values > Here is the

[ansible-project] New Ansible release 2.9.5

2020-02-13 Thread Matt Clay
Hi all- we're happy to announce that the general release of Ansible 2.9.5 is now available! How do you get it? -- $ pip install ansible==2.9.5 --user The tar.gz of the release can be found here: * 2.9.5 https://releases.ansible.com/ansible/ansible-2.9.5.tar.gz SHA256:

[ansible-project] timout-playbook for ubuntu after reboot

2020-02-13 Thread Work-Hard
*Hi, can someone please explain why my playbook for instance timeout after a reboot:* /dev/null 2>&1 && sleep 0' The full traceback is: WARNING: The below traceback may *not* be related to the actual failure. File

[ansible-project] Re: KEY: VALUE iterations

2020-02-13 Thread Anand Solomon
Thanks again Vlado I want to parse the json output and take the values Here is the json debug output from the playbook I run, TASK [Display the query results] ok:

Re: [ansible-project] KEY: VALUE iterations

2020-02-13 Thread Anand Solomon
I want to parse the json output and take the values Here is the json output from the playbook I run, TASK [Display the query results] > > ok:

Re: [ansible-project] KEY: VALUE iterations

2020-02-13 Thread Vladimir Botka
On Thu, 13 Feb 2020 09:25:16 -0800 (PST) Anand Solomon wrote: > Here is what I get as the debug out when I run my loop. I need to parse the > JSON and get the hightlighted value to my Jinja template. I don't see anything highlighted. What am I missing? > "msg": { > "changed":

Re: [ansible-project] KEY: VALUE iterations

2020-02-13 Thread Anand Solomon
Sorry about that. Here is what I get as the debug out when I run my loop. I need to parse the JSON and get the hightlighted value to my Jinja template. "msg": { "changed": false, "msg": "All items completed", "results": [ { "ansible_facts":

Re: [ansible-project] KEY: VALUE iterations

2020-02-13 Thread Vladimir Botka
On Thu, 13 Feb 2020 08:32:08 -0800 (PST) Anand Solomon wrote: > sql works fine actually. No issues with that. I am getting the query > results. Here is the result > > "msg": { > "changed": false, > "msg": "All items completed", > "results": [ > { >

[ansible-project] Re: Question about variables.

2020-02-13 Thread Stephen Nesbitt
I'm not familiar with the ec2_snapshot info module, but the core problem is the registered variable "snap" - which is a dictionary - does not have a key 'snapshot_id'. What I often do in these cases is to add a debug task immediately after the task that registers the variable which simply

Re: [ansible-project] KEY: VALUE iterations

2020-02-13 Thread Anand Solomon
Hello Vlado, sql works fine actually. No issues with that. I am getting the query results. Here is the result "msg": { "changed": false, "msg": "All items completed", "results": [ { "ansible_facts": {

[ansible-project] Question about variables.

2020-02-13 Thread Jamal Gardiner
- name: Gather EC2 Snapshot Info ec2_snapshot_info: filters: "tag:Name": fortune register: snap - name: AMI registration from EBS Snapshot ec2_ami: name: fortune state: present architecture: x86_64 virtualization_type: hvm root_device_name: /dev/xvda

Re: [ansible-project] Comparing two hosts with ansible (installed packages and configuration files)

2020-02-13 Thread Elb Isna
Thank you very much for your answer. -- 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 view this discussion

Re: [ansible-project] KEY: VALUE iterations

2020-02-13 Thread Vladimir Botka
On Thu, 13 Feb 2020 05:57:39 -0800 (PST) Anand Solomon wrote: > - include_vars: > file: /home/ansible/Playbooks/Compliance1.yml > name: scripts > - debug: > msg: "{{ sqlqry }}: {{ sqlid }}" > vars: > sqlqry: "{{ item.key }}" > sqlid: "{{

Re: [ansible-project] How can I search for an specific IP-Address on all of my Ansible-connected hosts

2020-02-13 Thread Stefan Hornburg (Racke)
On 2/13/20 3:11 PM, Matthias Steffens wrote: > Hm, I don't know how such an entry could look like. I'm only looking for this > IP-address and if necessary for the FQDN > as you've > correctly observed. > > Therefore I thought I can grep for the IP-address in every file on every host > with

Re: [ansible-project] How can I search for an specific IP-Address on all of my Ansible-connected hosts

2020-02-13 Thread Matthias Steffens
Hm, I don't know how such an entry could look like. I'm only looking for this IP-address and if necessary for the FQDN as you've correctly observed. Therefore I thought I can grep for the IP-address in every file on every host with ansible and get an list of hosts where it's configured or

Re: [ansible-project] How can I search for an specific IP-Address on all of my Ansible-connected hosts

2020-02-13 Thread Stefan Hornburg (Racke)
On 2/13/20 2:43 PM, Matthias Steffens wrote: > Hi Racke, > > thanks for your fast reply and sorry for the misleading problem. My task is > to find out if an old relay-host with the > IP-Address "192.168.110.45" is configured on > any of the hosts which are in my hosts-List configured. And

Re: [ansible-project] KEY: VALUE iterations

2020-02-13 Thread Anand Solomon
Thanks again Vlado. I am struggling with the basics here... This is my block - include_vars: file: /home/ansible/Playbooks/Compliance1.yml name: scripts - debug: msg: "{{ sqlqry }}: {{ sqlid }}" vars: sqlqry: "{{ item.key }}" sqlid: "{{

Re: [ansible-project] How can I search for an specific IP-Address on all of my Ansible-connected hosts

2020-02-13 Thread Matthias Steffens
Hi Racke, thanks for your fast reply and sorry for the misleading problem. My task is to find out if an old relay-host with the IP-Address "192.168.110.45" is configured on any of the hosts which are in my hosts-List configured. And therefore I thought that I can do it with an 'grep' on every

Re: [ansible-project] How can I search for an specific IP-Address on all of my Ansible-connected hosts

2020-02-13 Thread Stefan Hornburg (Racke)
On 2/13/20 1:34 PM, Matthias Steffens wrote: > > > Am Mittwoch, 12. Februar 2020 23:46:21 UTC+1 schrieb Vladimir Botka: > > On Wed, 12 Feb 2020 13:00:55 -0800 (PST) > Matthias Steffens > wrote: > > > I'm looking for an method by which I can have a look on all of my > >

Re: [ansible-project] How can I search for an specific IP-Address on all of my Ansible-connected hosts

2020-02-13 Thread Matthias Steffens
Am Mittwoch, 12. Februar 2020 23:46:21 UTC+1 schrieb Vladimir Botka: > > On Wed, 12 Feb 2020 13:00:55 -0800 (PST) > Matthias Steffens > wrote: > > > I'm looking for an method by which I can have a look on all of my > > 'Ansible-Clients' for an specific IP-Address. > > Try this > > - hosts:

[ansible-project] Re: Skipping plugin

2020-02-13 Thread Jegan A
The issue is fixed by myself. One of the recent package install via pip was causing the issue. After removing that package issue got fixed. On Thursday, February 13, 2020 at 4:41:06 PM UTC+5:30, Jegan A wrote: > > Hello Team, > >Am getting below warning message while running ansible Ad

[ansible-project] Skipping plugin

2020-02-13 Thread Jegan A
Hello Team, Am getting below warning message while running ansible Ad hoc command. There is no changes made in ansible.cfg file. How to avoid the below warning message. Could you please some one help me on this. [WARNING]: Skipping plugin

Re: [ansible-project] Ansible user home directory issue

2020-02-13 Thread Kai Stian Olstad
On Thu, Feb 13, 2020 at 01:55:20AM -0800, Bala Mutyam wrote: > Hi all, > > ansible --version > ansible 2.7.7 > > > I'm not sure if it's a bug? No, why would you think that? > I'm creating a system user & group without home directory and > --disabled-login but in the /etc/passwd , it's

[ansible-project] Pulling roles from github and run through ansible

2020-02-13 Thread soumya dutta
Hi, I have created roles for ansible and put them in git. Now I want to use it in a playbook and I have specified roles in requirements.yml. Now I need to run this playbook through an ansible master server CLI. What is the best way to do it? -- You received this message because you are

Re: [ansible-project] Ansible expect module with Oracle SBC

2020-02-13 Thread Kai Stian Olstad
On Thu, Feb 13, 2020 at 01:22:37AM -0800, Gerhard Van Der Wath wrote: > Thank you Kai. > > I think I am making progress, is this the output that is expected: > > "* > *", > "* Disconnect IMMEDIATELY if you are not

[ansible-project] Ansible user home directory issue

2020-02-13 Thread Bala Mutyam
Hi all, ansible --version ansible 2.7.7 I'm not sure if it's a bug? I'm creating a system user & group without home directory and --disabled-login but in the /etc/passwd , it's showing as home directory created but it doesn't exist. Playbook: - name: Create sonarqube group group:

Re: [ansible-project] parted - azure managed disks - unrecognized disk label

2020-02-13 Thread 'deewon' via Ansible Project
I know right :) It was an isolated lab environment so no harm done. appreciated! On Wednesday, February 12, 2020 at 5:09:57 PM UTC, Hugo Gonzalez wrote: > > > > On 2/11/20 6:23 AM, 'deewon' via Ansible Project wrote: > > I got to the bottom of this eventually :) > > The task was running on

Re: [ansible-project] Ansible expect module with Oracle SBC

2020-02-13 Thread Gerhard Van Der Wath
Thank you Kai. I think I am making progress, is this the output that is expected: "* *", "* Disconnect IMMEDIATELY if you are not an authorized user! *", "*All access and use may be monitored

[ansible-project] ansible proxy settings

2020-02-13 Thread Pierre Ochsenbein
Guys, idea to fix this issue. Goals is to build the connection with winrm to a windows server from a ansible server. { "unreachable": true, "msg": "ssl: HTTPSConnectionPool(host='host01', port=5986): Max retries exceeded with url: /wsman (Caused by ProxyError('Cannot connect to