[ansible-project] ansible block not running as expected

2017-02-14 Thread Adrian Paraschiv
I have ansible 2.2.1.0 and I have this role: - block: - shell: echo 1 - shell: fail - shell: echo 2 rescue: - shell: echo 3 always: - shell: echo 4 - name: running something after the block shell: echo 5 If I run this role, the first part of the block fails

[ansible-project] lineinfile transiently results in empty file

2017-02-14 Thread Ben Watson
Greetings, I'm using the devel branch on Ansible Github (e.g. version 2.3) and have run into a curious problem the past few weeks regarding the use of lineinfile that was seemingly bulletproof in prior versions (e.g. 2.0, 2.1, 2.2). We've moved to 2.3 for needed enhancements. I say that the

[ansible-project] Calling a dictionary based on an existing variable

2017-02-14 Thread Nicholas Santiago
I have a playbook (ldapconfig.yml) with a variables file (ldapconfig_vars.yml), and am hoping to use an inventory var to specify which dictionary of the below to call. So, if env=PVS, it calls the ldapserver_pvs dictionary, if env=PROD, it calls the ldapserver_prod dict, and so on.

[ansible-project] Re: How to specify a virtual network in a different resource group when creating a new Azure VM?

2017-02-14 Thread Bamar Diagne
Hi, I am facing the same issue, did you manage to get down to the bottom of this. I am having no luck so far. Cheers Bamar On Friday, 13 January 2017 02:38:18 UTC, Vincent Ngan wrote: > > Hi, > > I am trying to create a VM in Azure using Ansible. The setup of our Azure > configuration is that

[ansible-project] Test Problem

2017-02-14 Thread Ben Wright
Test - as previous did not appear -- 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

[ansible-project] Create a Array of integer

2017-02-14 Thread Christian Iuga
Hi, To manage ldap entry ( via new ansible modules ldap_attr and ldap_entry ) i need a different uidNumber than already exist to making it i'm doing these jobs : - name: Initialize an empty list for our strings set_fact: uidRange: [] - name: create array set_fact:

[ansible-project] Could ansile access remote hosts by serial console over LAN

2017-02-14 Thread rong zhao
Hi Dears, My remote hosts' management port is serial console over LAN. When connect by ssh manually, I use ops account connect to remote hosts, and then it become the Linux console, I just run ssh command. Now, I use ansible -m ping to test reachable, it reports: "Authentication or

[ansible-project] ansible winrm : the specified credentials were rejected by the server

2017-02-14 Thread Hmdi Bz
Hi, I'm using ansible on centos 7 guest on virtualBox using a bridged network with a windows host they can both ping each other. (windows address: 192.168.1.2, centos7 address: 192.168.1.3) I'm using a basic winrm connection and I've already executed configureRemotingForAnsible.ps1 successfuly

[ansible-project] Variable president - default and variable in playbook

2017-02-14 Thread Ben Wright
Hi Please bear with me. I have created a role and in the defaults/main.yml I have created a variable tibco_install_bin for which I have a value. I have created a playbook, and within that playbook I have created other variable for when the role is run: roles: - { role: tibco-install1,

[ansible-project] Re: Module fetch -- checksum error

2017-02-14 Thread Markus Huber
Jacek, could you figure this issue out? Seems I experience the same problem with a large file. On Thursday, April 30, 2015 at 8:34:13 AM UTC+2, Jacek wrote: > > Just to give a little more insight. I cut the size of my ' > eSC-store-.tgz' file down to 396MB and exactly the same code works >

Re: [ansible-project] How can I iterate over a dictionary in a task?

2017-02-14 Thread 'Felix Fontein' via Ansible Project
Hi, I created a plugin for more complicated looping, which also covers your problem. You can find the plugin here: https://github.com/felixfontein/ansible-dependentloop With it, your problem could be solved as follows: - name: Get the files depending on server name get_url:

Re: [ansible-project] Abort executing playbook if condition not match

2017-02-14 Thread DHAVAL JAISWAL
I tried with fail and it works. Is this works when we set any_errors_fatal: true On Tue, Feb 14, 2017 at 10:25 PM, Kai Stian Olstad < ansible-project+l...@olstad.com> wrote: > On 14. feb. 2017 17:43, bablu wrote: > >> >> If condition fails it should not go for the next step and exit from

Re: [ansible-project] Re: How can I iterate over a dictionary in a task?

2017-02-14 Thread ZillaYT
Thanks, I'll try this too. On Tuesday, February 14, 2017 at 12:19:30 PM UTC-5, Kai Stian Olstad wrote: > > On 14. feb. 2017 17:54, ZillaYT wrote: > > I posted the same question on Stackoverflow, and got the answer I was > > looking for. Ugly, but it works. > > >

Re: [ansible-project] Re: How can I iterate over a dictionary in a task?

2017-02-14 Thread Kai Stian Olstad
On 14. feb. 2017 17:54, ZillaYT wrote: I posted the same question on Stackoverflow, and got the answer I was looking for. Ugly, but it works. http://stackoverflow.com/questions/42167747/how-to-loop-over-this-dictionary-in-ansible Or just use loop in a loop with loop control. Task: -

[ansible-project] Re: How can I iterate over a dictionary in a task?

2017-02-14 Thread ZillaYT
I posted the same question on Stackoverflow, and got the answer I was looking for. Ugly, but it works. http://stackoverflow.com/questions/42167747/how-to-loop-over-this-dictionary-in-ansible On Friday, February 10, 2017 at 4:22:28 PM UTC-5, ZillaYT wrote: > > Say I have the following dictionary?

Re: [ansible-project] Abort executing playbook if condition not match

2017-02-14 Thread Kai Stian Olstad
On 14. feb. 2017 17:43, bablu wrote: If condition fails it should not go for the next step and exit from there only. In following situation, when: C != test_valit should exit from here only instead of going to the next step. How can i achieve this. - name: Set the output of the

[ansible-project] Abort executing playbook if condition not match

2017-02-14 Thread bablu
If condition fails it should not go for the next step and exit from there only. In following situation, when: C != test_valit should exit from here only instead of going to the next step. How can i achieve this. - name: Set the output of the this state set_fact:

Re: [ansible-project] store the output of math operator

2017-02-14 Thread DHAVAL JAISWAL
- name: Set the output of the this state set_fact: A="{{image_avl.stdout}}" -- this is coming from the previous registered output tags: avl1 - name: Define our static value for the desired image number set_fact: B={{retain}} -- this is coming from

Re: [ansible-project] How to start a background task in Ansible 2.x through the API?

2017-02-14 Thread Matt Martz
In the example at http://docs.ansible.com/ansible/dev_guide/developing_api.html#python-api-2-0 You would use `async` in building your tasks defined in the `play_source` dict. Effectively in 2.x you are building a play, and that play is where you put those options. On Mon, Feb 13, 2017 at 7:48

Re: [ansible-project] store the output of math operator

2017-02-14 Thread Dick Visser
On 14 February 2017 at 16:12, DHAVAL JAISWAL wrote: > solved it. Well done! Any chance of sharing *how* you solved it? Thanks, -- Dick Visser Sr. System & Network Engineer GÉANT Want to join us? We're hiring: https://www.geant.org/jobs -- You received this message

Re: [ansible-project] store the output of math operator

2017-02-14 Thread DHAVAL JAISWAL
solved it. On Tue, Feb 14, 2017 at 6:00 PM, bablu wrote: > >- name: Set the output of the this state > set_fact: A="{{image_avl.stdout}}" -- this is coming from > the previous registered output > tags: avl1 > >- name: Define our static value for

Re: [ansible-project] How can I iterate over a dictionary in a task?

2017-02-14 Thread ZillaYT
The loop_control documentation doesn't make really explain how I can use it in my case. On Saturday, February 11, 2017 at 4:35:18 AM UTC-5, Kai Stian Olstad wrote: > > On 10. feb. 2017 23:24, ZillaYT wrote: > > Let me as a different question. What If I want to show ALL the files in > a > >

[ansible-project] store the output of math operator

2017-02-14 Thread bablu
- name: Set the output of the this state set_fact: A="{{image_avl.stdout}}" -- this is coming from the previous registered output tags: avl1 - name: Define our static value for the desired image number set_fact: B={{retain}} -- this is coming