Re: [ansible-project] Managing /etc/resolv.conf with Ansible

2017-03-27 Thread Jörg Kastning
Hi, I would like to thank you for your hint. We are going to set the option "dns=none" in NetworkManager.conf with the ansible 'lineinfile' module and then deploy the /etc/resolv.conf with the template module. Thanks, Joerg Am Mittwoch, 22. März 2017 11:30:56 UTC+1 schrieb Jean-Yves LENHOF: >

[ansible-project] Download a file in control machine and copy to windows host

2017-03-27 Thread Suporter
Hi, I want to download files from an URL to control machine and store them in it and copy them over to windows host. How can we achieve this in single playbook -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group

Re: [ansible-project] Installing Ansible on AIX

2017-03-27 Thread Mona Gopal
Hey Smooge, Thanks for the reply!! Will surely try out the link sent :) Even we have just one box to test this on hence the IT does the trial and errors. :D Will get back to you on this. Regards, Mona On Monday, March 27, 2017 at 8:31:12 PM UTC+5:30, Smooge wrote: > > On 7 March 2017 at 02:49,

Re: [ansible-project] Installing Ansible on AIX

2017-03-27 Thread Mona Gopal
Hey Greg, Thanks for the reply :) I am trying to do both (1) and (2) as mentioned by you. Earlier we were trying to connect to the remote(AIX) machines from a linux box. We have been successful in doing so. However, the connectivity being poor, the plan changed to setting up ansible on the AIX m

Re: [ansible-project] Installing Ansible on AIX

2017-03-27 Thread Mona Gopal
Hey Dick!! To clarify the confusions. I am trying to install Ansible software on an AIX machine. In the process of setting up ansible, i am facing difficulties to install pip on this AIX box. NOTE: The remote machines which i am going to connect to are also AIX machines. Regards, Mona On M

[ansible-project] Recovering from a failed playbook include

2017-03-27 Thread lmeyer
My use case is that I'm trying to run integration tests on playbooks - that is, test the playbooks under various scenarios. For each test, I want to spin up a docker container (or several) and use them as the inventory for the playbook being tested by including the playbook. Then I'd like to de

Re: [ansible-project] Ansible-doc - is everything in it?

2017-03-27 Thread Brian Coca
No, ansible-doc only had module information, in 2.4 we are adding the rest of plugins (including lookup , which is what with_ partially is). Config settings might also be added, but there is no current plan to add Ansible keywords, but now I'll keep that in mind. If using the repo, most of the we

[ansible-project] Re: Network config modules (eos_config, ios_config) fuzzy matching lines, and what is the "config" parameter?

2017-03-27 Thread bill paxton
I did something similar for NTP on IOS, maybe this will help you: 1) Provide a list of NTP server addresses I want provisioned - { role: ntp, state: present, ntp_source_interface: Vlan10, ntp_servers: [ 0.us.pool.ntp.org, 1.1.1.1,

[ansible-project] Re: Ansible 2.2.2 and 2.1.5 FINAL have been released!

2017-03-27 Thread henrique . rodrigues
Hi, Is there a changelog available for 2.2.2? I can't seem to find it in GitHub or in the tarballs for 2.2.2. Thank you, Henrique Rodrigues On Monday, 27 March 2017 22:10:26 UTC+1, James Cammarata wrote: > > Hi all, we are happy to announce that Ansible 2.2.2 and 2.1.5 have been > released. >

[ansible-project] Ansible 2.3.0 RC2 is available for testing

2017-03-27 Thread James Cammarata
We are happy to announce the availability of Ansible 2.3.0 RC2! This release candidate includes a lot of small bug fixes, including (but not limited to): * Better detection of relative files (DWIM) for roles, fixing some bugs. * Fix for loosing ungrouped hosts in ini * Prevent failure for meta: r

Re: [ansible-project] Loop through inventory group and reference index of host

2017-03-27 Thread Dick Davies
Hi Kevin I'm assuming you're putting a config file for each server on some central server (it's not clear where the play is targeted, but it would explain hostvars[]). [ even so, maybe you can replace: hostvars[item]['ansible_hostname'] with just item ? ] It looks like you want each

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

2017-03-27 Thread Trond Hindenes
More interesting would be to use restricted endpoints, which lets you execute stuff as a different user as the one you're logging in with. That way you'd have one credential that would actually do all the things, and another credential to connect with. Unsure whether pywinrm supports it - maybe

[ansible-project] Ansible 2.2.2 and 2.1.5 FINAL have been released!

2017-03-27 Thread James Cammarata
Hi all, we are happy to announce that Ansible 2.2.2 and 2.1.5 have been released. This release fixes a few bugs introduced in the previous version, as well as another small tweak to catch an additional way in which CVE-2016-9587 could be triggered. As always, these updates are available via PyPi

[ansible-project] Ansible-doc - is everything in it?

2017-03-27 Thread Listing
Hi, Sometimes I need (offline) information about how to use specific arguments on modules like 'with_items', 'with_files', 'tags', 'when' etc. I would then like to use ansible-doc to get my playbook done, but I seem to be unable to find information in ansible-doc about this. Is this present? I

[ansible-project] Loop through inventory group and reference index of host

2017-03-27 Thread Kevin Cackler
I have an inventory file defined as follows: [app] app1.service.com ansible_host=192.168.1.1 app2.service.com ansible_host=192.168.1.2 app3.service.com ansible_host=192.168.1.3 I need to generate multiple configuration files for each of those hosts. The current task looks like t

[ansible-project] Re: Windows installer fails via Ansible

2017-03-27 Thread Justin Dugan
Jon, I have checked with the installer developers and they have confirmed there are no options for specifying credentials. Any ideas why it's trying an anonymous login only when executed via ansible? Thanks, Justin On Tuesday, March 21, 2017 at 5:30:34 PM UTC-4, J Hawkesworth wrote: > > > Tha

Re: [ansible-project] using a dict as task parameters

2017-03-27 Thread lmeyer
Thanks, that seems to do what I want! I ended up with: - name: adjust host facts. set_fact: "{{ item.key }}": "{{ item.value }}" delegate_facts: True delegate_to: "{{ container_name }}" with_dict: "{{ l_host_vars }}" I should note that first I tried: - na

Re: [ansible-project] using a dict as task parameters

2017-03-27 Thread Kai Stian Olstad
On 27. mars 2017 19:13, lme...@redhat.com wrote: That would work, but is there a way that would allow me to pass in arbitrary variables instead of just a known list? I don't think it's possible with add_host, but you can use set_fact - set_fact: "{{ item.name }}": "{{ item.value }}"

[ansible-project] Asynchronously calling roles

2017-03-27 Thread Nicholas Santiago
I'm looking to call groups of roles at the same time in an asynchronous fashion, but have yet to figure out how to do so. My playbook is relatively simple: --- # release.yml - hosts: "{{ host_group }}" remote_user: "{{ release_user }}" serial: 99 vars_files: - release_vars.yml ro

Re: [ansible-project] using a dict as task parameters

2017-03-27 Thread lmeyer
That would work, but is there a way that would allow me to pass in arbitrary variables instead of just a known list? -- 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 em

[ansible-project] Re: Ansible 2.2.1.0 aliases does not work as expected

2017-03-27 Thread Dmitriy Lomanchuk
It was my silly configuration mistake. There are a lot of servers with very long hostnames in my network. That is why I changed ansible.cfg control_path parameter to: So, if ansible_host and ansible_user are the same for multiple hosts - the problem occures. control_path = %(directory)s/%%h-%%r

Re: [ansible-project] using a dict as task parameters

2017-03-27 Thread Kai Stian Olstad
On 26. mars 2017 17:17, lme...@redhat.com wrote: Under Ansible 2.2.1 and python 2.7 I have a playbook for generically creating a docker container and then adding it as a host (using the docker connection plugin of course): - name: Start specified container gather_facts: no hosts: localhost

Re: [ansible-project] Installing Ansible on AIX

2017-03-27 Thread Greg DeKoenigsberg
On Mon, Mar 27, 2017 at 11:36 AM, Stephen John Smoogen wrote: > On 27 March 2017 at 11:17, Greg DeKoenigsberg wrote: >> On Mon, Mar 27, 2017 at 11:04 AM, Mona Gopal wrote: >>> I am trying to install ansible on AIX 7.1 machine >> >> You need to be more specific. >> >> Ansible is a program that m

Re: [ansible-project] Installing Ansible on AIX

2017-03-27 Thread Stephen John Smoogen
On 27 March 2017 at 11:17, Greg DeKoenigsberg wrote: > On Mon, Mar 27, 2017 at 11:04 AM, Mona Gopal wrote: >> I am trying to install ansible on AIX 7.1 machine > > You need to be more specific. > > Ansible is a program that manages other systems via SSH. > > Are you (1) using an AIX system to ru

Re: [ansible-project] Installing Ansible on AIX

2017-03-27 Thread Greg DeKoenigsberg
On Mon, Mar 27, 2017 at 11:04 AM, Mona Gopal wrote: > I am trying to install ansible on AIX 7.1 machine You need to be more specific. Ansible is a program that manages other systems via SSH. Are you (1) using an AIX system to run Ansible *from*, or (2) do you want to use Ansible to manage AIX

[ansible-project] Re: using a dict as task parameters

2017-03-27 Thread lmeyer
To elaborate a bit on my use case, I'm trying to run integration tests on playbooks - that is, test the playbooks in various scenarios. For each test, I want to spin up a docker container (or several) and treat them as the hosts against which the playbook is being tested. And then I'd like to d

Re: [ansible-project] Installing Ansible on AIX

2017-03-27 Thread Mona Gopal
I am trying to install ansible on AIX 7.1 machine On Mar 27, 2017 8:32 PM, "Dick Visser" wrote: > On 27 March 2017 at 14:02, Mona Gopal wrote: > > Hey Jon, > > > > The link doesn't give an explanation on setting up Ansible. It only > guides > > to setup python. > > The python setup has been do

Re: [ansible-project] Installing Ansible on AIX

2017-03-27 Thread Dick Visser
On 27 March 2017 at 14:02, Mona Gopal wrote: > Hey Jon, > > The link doesn't give an explanation on setting up Ansible. It only guides > to setup python. > The python setup has been done. However, unable to install pip which would > help me in installing Ansible. In case it is not obvious. "Insta

Re: [ansible-project] Installing Ansible on AIX

2017-03-27 Thread Stephen John Smoogen
On 7 March 2017 at 02:49, Mona Gopal wrote: > Hello, > > I need ansible to be installed on AIX 6.1 and 7.1. > Kindly provide the pre-requisites and steps for installation of ansible > > Also, would it require any changes to be done in the playbook? > > Have been referring to the below link, but ha

[ansible-project] Re: How to pass multiple special symbols with shell module?

2017-03-27 Thread Bhavin Parmar
{{ group }} and {{ var_file }} are variables. On Monday, March 27, 2017 at 4:40:55 PM UTC+5:30, Bhavin Parmar wrote: > > I am using shell command to execute sed output piped to cut. Task in a > playbook is as follow: > > tasks: >- name: "Task 1: Fetch inv" > shell: '/bin/sed

Re: [ansible-project] man1 docs do not exist when attempting to build ansible rpm for centos 5

2017-03-27 Thread Brian Coca
I just changed how man pages are generated, try doing `make docs` first, I'll look into why `make rpm` isn't also triggering this. -- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop

[ansible-project] using a dict as task parameters

2017-03-27 Thread lmeyer
Under Ansible 2.2.1 and python 2.7 I have a playbook for generically creating a docker container and then adding it as a host (using the docker connection plugin of course): - name: Start specified container gather_facts: no hosts: localhost connection: local vars: container_name: op

[ansible-project] man1 docs do not exist when attempting to build ansible rpm for centos 5

2017-03-27 Thread Haani Niyaz
I am attempting to build the ansible rpm from source for Centos 5 based on instructions here: http://docs.ansible.com/ansible/intro_installation.html#basics-what-will-be-installed When i run the 'make rpm' command I encounter the following error: + mkdir -p /var/tmp/ansible-2.4.0-100.git2017032

Re: [ansible-project] Installing Ansible on AIX

2017-03-27 Thread Mauricio Tavares
On Mon, Mar 27, 2017 at 8:02 AM, Mona Gopal wrote: > Hey Jon, > > The link doesn't give an explanation on setting up Ansible. It only guides > to setup python. > The python setup has been done. However, unable to install pip which would > help me in installing Ansible. > Any easier approach availa

Re: [ansible-project] Installing Ansible on AIX

2017-03-27 Thread Mona Gopal
Hey Jon, The link doesn't give an explanation on setting up Ansible. It only guides to setup python. The python setup has been done. However, unable to install pip which would help me in installing Ansible. Any easier approach available?? Regards, Mona G On Thursday, March 9, 2017 at 1:31:05

[ansible-project] Re: Download all files from a url

2017-03-27 Thread 'J Hawkesworth' via Ansible Project
Yes. Just use the 'force: no' parameter - see http://docs.ansible.com/ansible/win_get_url_module.html On Monday, March 27, 2017 at 9:36:49 AM UTC+1, Suporter wrote: > > right now, i am downloading with exact link of the files and added those > to with_items...is there a way to check if the file

[ansible-project] Re: Best Approach- Writing powershell scripts or using Modules?

2017-03-27 Thread 'J Hawkesworth' via Ansible Project
It tells the module that what the expected outcome of making the desired change is, so if the file is present, the module 'knows' it doesn't need to make any further changes. If you make all your tasks work like this, you can re-run your playbooks in the knowledge that they will only make chang

Re: [ansible-project] How to read sub-members from group, within YAML file (i.e. like custom Ansible hosts file)

2017-03-27 Thread Bhavin Parmar
Hi Dick, Yes, you are right. This file is custom generated. Yes, I will replace from instance-id to instance_id. At the time of creating such custom configuration (i.e. INI or YAML) file. Such configuration file (i.e. host inventory file) will be created when infra is created. But it may be us

Re: [ansible-project] How to read sub-members from group, within YAML file (i.e. like custom Ansible hosts file)

2017-03-27 Thread Dick Davies
Hi Bhavin I may be wrong but it sounded like you are generating this file yourself. So if instance-id is invalid, why not use instance_id instead? If it's an inventory there's no need to use a lookup_ function, just pass that to the next playbook. e.g. ansible-playbook createinstances.yml # y

[ansible-project] How to pass multiple special symbols with shell module?

2017-03-27 Thread Bhavin Parmar
I am using shell command to execute sed output piped to cut. Task in a playbook is as follow: tasks: - name: "Task 1: Fetch inv" shell: '/bin/sed -n '/'{{ group }}'/,/^$/p' {{ var_file }} | cut -d'=' -s -f2' register: scriptout - debug: var=scriptout I have

Re: [ansible-project] How to read sub-members from group, within YAML file (i.e. like custom Ansible hosts file)

2017-03-27 Thread Bhavin Parmar
Thanks, Dick Davies, I have few related queries: 1. As best of my understanding *Instance-Id* is not a valid key world to be placed in an Ansible hosts file. Is it okay, if we place such keywords without making them comment (#)? Will it create any problem, when such host inventory file will be

[ansible-project] Re: Download all files from a url

2017-03-27 Thread Suporter
right now, i am downloading with exact link of the files and added those to with_items...is there a way to check if the file is new or not..download only if it is new? On Friday, March 24, 2017 at 10:38:52 PM UTC+5:30, Suporter wrote: > > win_get_url has options to download all files from an url

[ansible-project] Re: Best Approach- Writing powershell scripts or using Modules?

2017-03-27 Thread Suporter
Intersting, but i am still new to ansible, will take some more days to get used to it.. What does creates do? On Monday, March 27, 2017 at 11:03:15 AM UTC+5:30, Suporter wrote: > > I am new to ansible, what is best approach , is it to use ansible's > windows modules for all the things or writin

[ansible-project] Re: Using Ansible 2.3 to Clone a VM from one VMware vDC to another vDC

2017-03-27 Thread 'J Hawkesworth' via Ansible Project
I haven't tried to do this myself but I know that vmware_guest module has had a lot of development work during 2.3 so might be worth checking if there is an open issue for this in the github project. I don't have access to a multi-datacenter vsphere so I can't test this myself. Jon On Friday,

[ansible-project] Re: Best Approach- Writing powershell scripts or using Modules?

2017-03-27 Thread 'J Hawkesworth' via Ansible Project
Well you can use ansible as a way of delivering and running powershell scripts and if that's all you need to do, that's fine. However I think its worth making use of modules and roles and templates and group vars and filters and 'doing stuff the ansible way' as once you have deployment sorted

Re: [ansible-project] How to read sub-members from group, within YAML file (i.e. like custom Ansible hosts file)

2017-03-27 Thread Dick Davies
That's an .ini file , not a yaml file. Why don't you just uncomment the key1= part? Then you can use it as an inventory directly and be able to access both instance-id and key1 as host vars. Personally I'd split this into 2 plays - one provisioner (that has the file creation as its last task) and