Re: [ansible-project] Re: Target machines are unreachable

2020-05-05 Thread Dick Visser
I see two totally unrelated messages containing just an error? To answer your question more information is needed. Could you please describe clearly all of the below: - What goal you are trying to achieve. - How you are doing this. - What problems you encounter. - Which commands did you run,

[ansible-project] Ansible stops if unreachable, can it be ignored to continue the playbook?

2020-05-05 Thread Jimmy Malhan
Ansible stops if unreachable, can it be ignored to continue the playbook? Thanks-- -- 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

Re: [ansible-project] Running Ansible playbook with Jenkins plugin ... now need to add git

2020-05-05 Thread Kiran Kumar
Thanks Vivek On Sat, May 2, 2020 at 11:56 PM Vivek Kothawale wrote: > Hi > > To achieve the above mentioned objective you can wirte Jenkins file and > package all the files using fpm and deploy that package in jenkins server > and then you can run playbooks using ansible jenkins by providing

[ansible-project] Re: Target machines are unreachable

2020-05-05 Thread Work-Hard
FAILED! => {"changed": false, "cmd": ["dpkg", "--configure", "a"], "delta": "0:00:00.064010", "end": "2020-05-06 01:18:35.173136", "msg": "non-zero return code", "rc": 1, "start": "2020-05-06 01:18:35.109126", "stderr": "dpkg: error processing package a (--configure):\n no package named 'a'

[ansible-project] Target machines are unreachable

2020-05-05 Thread Work-Hard
my target machines are up. I don't understand why I am running this error Using module file /usr/lib/python2.7/dist-packages/ansible/modules/windows/setup.ps1 Pipelining is enabled. ESTABLISH WINRM CONNECTION FOR USER: None on PORT 5986 TO fatal: []: UNREACHABLE! => { "changed": false,

Re: [ansible-project] Ansible lininfile behavior

2020-05-05 Thread Kai Stian Olstad
On Tue, May 05, 2020 at 09:19:50AM +0200, Vladimir Botka wrote: > On Tue, 5 May 2020 00:47:10 +0200 > Vladimir Botka wrote: > > > On Tue, 5 May 2020 00:02:40 +0200 > > Kai Stian Olstad wrote: > > > > > On Mon, May 04, 2020 at 11:19:53PM +0200, Vladimir Botka wrote: > > > > There is no such

Re: [ansible-project] Ansible lininfile behavior

2020-05-05 Thread Kai Stian Olstad
On Mon, May 04, 2020 at 11:55:14PM +0200, Vladimir Botka wrote: > On Mon, 4 May 2020 23:06:50 +0200 > Kai Stian Olstad wrote: > > > > > Add "throttle: 1" to you lineinfile task and it will work. > > > > > > I don't need "throttle" with 2.9.6. The playbook > > > > That is just pure luck, try

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

2020-05-05 Thread Raj V
Hi Kai, I have resolved my issue with group_by. Grouping by primary and non-primary and run commands on non-primary hosts. Thank you for your suggestions. On Sunday, April 26, 2020 at 6:02:11 PM UTC-4, Kai Stian Olstad wrote: > > On Mon, Apr 20, 2020 at 11:14:23AM -0700, Raj V wrote: > > I

Re: [ansible-project] Need help on formating stdout_lines output

2020-05-05 Thread Suresh Karpurapu
would anyone please help me on this request? Regards, Suresh On Tue, May 5, 2020 at 2:45 AM Suresh Karpurapu wrote: > Here is my playbook, i would like to display all lines in stdout_lines in > below format without miss. I am able to display only first 3 lines but > host03 has more than 3

Re: [ansible-project] add_host scope from inside roles

2020-05-05 Thread Vladimir Botka
On Tue, 5 May 2020 09:48:44 -0700 (PDT) Nicola Limongi wrote: > THIS WORKS (from the playbook) > --- > - name: "provision Ec2" > hosts: localhost > connection: local > gather_facts: false > tasks: > - ec2_instance: > name: "{{ ec2_name }}" > security_groups: > [ecc

[ansible-project] add_host scope from inside roles

2020-05-05 Thread Nicola Limongi
Hi all, I'm a bit confused about the behavior of add_host when used from inside a role or directly in the playbook. Am I doing something wrong or am I just hitting some role's scope boundary? THIS WORKS (from the playbook) --- - name: "provision Ec2" hosts: localhost connection: local

Re: [ansible-project] Help with Conditions

2020-05-05 Thread Brian Coca
I would use vars to simplify the tasks themselves, alternatively you could use a block to establish the common condition - name: run when not powered off vmware_guest_powerstate: hostname: '{{ mdb_console.json.0[resolved_name]}}' ... vars: powerstate: '{{

Re: [ansible-project] Getting a message on folders created in a loop

2020-05-05 Thread Brian Coca
You want to loop over the results, each item is stored in the results list. - debug: msg: folder created {{item.item}} loop: '{{result.results}}' when: item is not failed ‪ -- -- Brian Coca -- You received this message because you are subscribed to the Google Groups

Re: [ansible-project] Loop range format quick question

2020-05-05 Thread Stefan Hornburg (Racke)
On 5/5/20 2:36 PM, Dave Zarei wrote: > HI, > > quick question about how to use a variable in loop range: > > I got this: > > loop: "{{range (0, 2+1) | list}}" > > > and this is what i want to use: > > loop: "{{range (0, myvariable +1) | list}}" > > > where "myvaribale" contains  number 2 >

[ansible-project] Loop range format quick question

2020-05-05 Thread Dave Zarei
HI, quick question about how to use a variable in loop range: I got this: loop: "{{range (0, 2+1) | list}}" and this is what i want to use: loop: "{{range (0, myvariable +1) | list}}" where "myvaribale" contains number 2 but it comes back with an error when i run it, i also tried to put

[ansible-project] Help with Conditions

2020-05-05 Thread David Foley
Hi All, Just wondering is their a better way of doing the Following? --- - hosts: localhost gather_facts: false tasks: - name: Getting vCenter Details uri: url: http:///mdb/{{ fqdn }} return_content: yes body_format: json register: mdb_console - copy:

Re: [ansible-project] Getting : error while evaluating conditional (my_result.stat.exists): 'bool object' has no attribute 'stat' while expcting to be dictionary

2020-05-05 Thread Stefan Hornburg (Racke)
On 5/5/20 12:26 PM, Meir Yanovich wrote: > i have this ansible simple playbook : > where "/home/ec2-user/test1.txt" exists on disk  > >     > | >  --- >     -name:check ifexsist >       hosts:localhost >       gather_facts:false >       tasks: >     >         -name:Getproject name >          

[ansible-project] Getting : error while evaluating conditional (my_result.stat.exists): 'bool object' has no attribute 'stat' while expcting to be dictionary

2020-05-05 Thread Meir Yanovich
i have this ansible simple playbook : where "/home/ec2-user/test1.txt" exists on disk --- - name: check if exsist hosts: localhost gather_facts: false tasks: - name: Get project name shell: "echo ''" register: name_var

Re: [ansible-project] Ansible lininfile behavior

2020-05-05 Thread Vladimir Botka
On Tue, 5 May 2020 00:47:10 +0200 Vladimir Botka wrote: > On Tue, 5 May 2020 00:02:40 +0200 > Kai Stian Olstad wrote: > > > On Mon, May 04, 2020 at 11:19:53PM +0200, Vladimir Botka wrote: > > > There is no such problem with Ansible running on controller with Python 3 > > > > > > >

[ansible-project] Getting a message on folders created in a loop

2020-05-05 Thread דודו דודו
I’m running a playbook that should create 2 folders in a loop. If the folder is not existing, I wish to get a message that folders was created In my scenario, folder 1 already exists and only folder 2 was created. But the message was skipped – I’m guessing that the register is being