Re: [ansible-project] ansible azure storage bug

2017-12-21 Thread Patrick Laimbock
On 21-12-17 18:05, Niloofar Radafshar wrote: Hi, I am using ansible 2.4.2 andĀ azure_rm_storageaccount module is throwing an error: An exception occurred during task execution. To see the full traceback, use -vvv. The error was: msrest.exceptions.SerializationError: Unable to build a model:

[ansible-project] azure_rm.py: msrestazure.azure_exceptions.CloudError: 403 Client Error

2017-08-30 Thread Patrick Laimbock
Hi, Ansible 2.4 git from 5 mins ago. Azure-SDK-for-python git from 20170824 I've created a Service Principal with Contributor role and am using a ~/.azure/credentials file. I've successfully launched a VM with Ansible on Azure. Now I'm trying out the contrib/inventory/azure_rm.py script and g

Re: [ansible-project] Re: how to get the ansible virt module to wait for a machine to finish shutting down

2016-10-27 Thread Patrick Laimbock
Hi, Here's a snippet that I use: - name: wait for the vm to shut down virt: command: status name: "{{ inventory_hostname }}" register: vmstatus until: vmstatus.status == 'shutdown' delegate_to: "{{ vmhost }}" retries: 1500 delay: 10 vmhost = the hypervisor on which the VM ru

Re: [ansible-project] How do I execute ALL the task in a YML file locally?

2016-10-25 Thread Patrick Laimbock
On 25-10-16 17:02, ZillaYT wrote: I have a role whose main.yml file includes several *.yml files, e.g., | main.yml --- -include:tasks1.yml -include:tasks2.yml tasks1.yml --- -name:Createdir file;path=/tmp/dir1 state=dir -name:Createfile fromtemplate template:src=my_script.sh.j2 dest=/tmp/

Re: [ansible-project] Stuck deploying templated configs for multiple users with with_items

2016-09-01 Thread Patrick Laimbock
Hi Kai, On 01-09-16 22:46, Kai Stian Olstad wrote: Are you trying to make all the users on all the sites? If so, check out with_nested https://docs.ansible.com/ansible/playbooks_loops.html#nested-loops Thank you for your suggestion. That was the solution :) In #ansible agaffney mentioned tha

[ansible-project] Stuck deploying templated configs for multiple users with with_items

2016-09-01 Thread Patrick Laimbock
Hi, I want to deploy a couple of OpenVPN configs to multiple users. It works for a single user but now I'm stuck trying to make it work for multiple users. Anyone have a suggestion how to make this work? Variables: --- openvpn_networks: site1: openvpn_config: site1-server1 site2:

Re: [ansible-project] How to define a base_dir var so you can use {{ base_dir }}/playbooks etc?

2016-08-03 Thread Patrick Laimbock
Hi Kai, Thank you for your feedback. On 03-08-16 09:44, Kai Stian Olstad wrote: On 01.08.2016 18:56, Patrick Laimbock wrote: Hi, Ansible 2.1.1.0. Situation: Tim and Bob both deploy servers. Tim checks out the central ansible git repo to /home/tim/ansible while Bob checks it out to /home/bob

[ansible-project] How to define a base_dir var so you can use {{ base_dir }}/playbooks etc?

2016-08-01 Thread Patrick Laimbock
Hi, Ansible 2.1.1.0. Situation: Tim and Bob both deploy servers. Tim checks out the central ansible git repo to /home/tim/ansible while Bob checks it out to /home/bob/ansible. No special ansible.cfg is used by either. Problem: paths differ (/home/tim/ansible vs /home/bob/ansible) so you can

[ansible-project] Problem creating a bridge with the nmcli module

2016-07-12 Thread Patrick Laimbock
Hi, Using Ansible 2.1.0.0 I'm trying to create a bridge br0 on a CentOS 7 host to replace its standard eth0 interface (dhcp). The nmcli examples don't cover a bridge so I tried to follow the logic for bonds. The snippet below does not work, meaning no ifcfg_br0 and ifcfg_br0_slave_1 files are

[ansible-project] Bug in with_nested and registered variables?

2016-05-03 Thread Patrick Laimbock
Hi, Earlier today on irc I heard that the snippet below not working might be a bug. Being new to Ansible and not wanting to waste the developers time I'd appreciate a confirmation that this is indeed a bug before filing it. --- - hosts: localhost gather_facts: no vars: my_users:

Re: [ansible-project] Multiple vars in with_nested problem

2016-05-03 Thread Patrick Laimbock
Hi Johannes, Thank you for your feedback. On 03-05-16 06:29, Johannes Kastl wrote: On 02.05.16 20:35 Patrick Laimbock wrote: with_nested: - "{{ user_exists.results }}" - "{{ mc_templates }}" Please correct me if I am mistaken, I am no expert on this. M

[ansible-project] Multiple vars in with_nested problem

2016-05-02 Thread Patrick Laimbock
Hi, I'm trying out (Ansible 2.0.2.0 on Fedora 23). The snippet below is also on http://pastie.org/10821272 Goal: expand task #3 below so it installs for existing users all the files listed in the variable mc_templates. Question: I tinkered but couldn't make it work (snippet + error at the