[ansible-project] Suppress su warning in shell command

2016-03-21 Thread Rick O'Shea
Using *su* in playbook tasks generates a warning. You cannot become root nor is there a root password on EC2 instances on AWS. Instead you can su without a password using the default ec2_user account. However, Ansible whines about su in shell commands and we want to suppress that without

[ansible-project] Ansible commands are not working in a fresh Ubuntu installation

2016-03-21 Thread Gaya
I installed latest Ansible in an Ubuntu 14.04 Vagrant box with following commands from the official documentation. $ sudo apt-get install software-properties-common $ sudo apt-add-repository ppa:ansible/ansible $ sudo apt-get update $ sudo apt-get install ansible The installation was

[ansible-project] Re: Playbooks in subdirectories

2016-03-21 Thread Max Kraszewski
Benjamin, Mike: Thanks for your replies and your advices. Now I know I need to reorganize a bit mi playboks and try to follow the Ansible best practices more closely. Thanks in advance!! Max El lunes, 21 de marzo de 2016, 12:02:18 (UTC-3), Mike Biancaniello escribió: > > I agree that it's

[ansible-project] Ansible 1.9.5-1 has been released

2016-03-21 Thread James Cammarata
Hi all, we're very happy to announce that Ansible 1.9.5-1 has been released. This release to the 1.9.x series addresses several critical bugs for those who are unable to update to Ansible 2.0. The fixes included are: * Compatibility fix with docker 1.8. * Fix a bug with the crypttab module

[ansible-project] Re: Multiple test conditions for when: not working

2016-03-21 Thread matthew . graham
This seemed to fix my issue but not sure if this is the way I should do it... any feedback would be lovely when: - ('0 upgraded, 0 newly installed' not in apt_update.stdout) - ('0 to upgrade, 0 to newly install' not in apt_update.stdout) On Monday, 21 March 2016 16:52:38

[ansible-project] item.key does not expand in default filter

2016-03-21 Thread jepper
I want to use the following to create users. I do not want to specify home explicitly in most cases, and default to /home/{username}... The example should explain clearer what I'm trying to say: user: name="{{ item.key }}" state=present home="{{ item.value.home |

Re: [ansible-project] Ansible2 in stable repo

2016-03-21 Thread Kevin Fenzi
On Sat, 19 Mar 2016 05:51:32 -0700 (PDT) George Khan wrote: > Hi all! > I ask it jan 18, and ask after 2 month: Any news about ansible2 in > debian8/centos7 _stable_ repo? :) If you mean the epel7 repo there, it's likely we will wait for 2.1 to come out. In particular

[ansible-project] Re: Hail Marry - Ansible - Open Stack

2016-03-21 Thread David Shrewsbury
You're probably running into versioning issues. The OpenStack modules support reading authentication information from a clouds.yaml file. I'd suggest using this method since Datacentred is one of the known providers that is known to work, and we automatically set the versions of the various

[ansible-project] include custom python library from custom module

2016-03-21 Thread Alexey Wasilyev
Hello! I am writing a set of custom ansible modules, that uses some shared code. And cant find a right way how this can be organised. Where I should put my custom python library under current catalog so it can be imported by my modules? I don't want to makes "official" library, available via

[ansible-project] Re: Ansible become option with passwordless

2016-03-21 Thread Matt Calhoun
Is there really no way to give the ansible user specific sudo NOPASSWD privileges? This seems like a huge security hole! On Monday, March 21, 2016 at 9:24:31 AM UTC-4, selvam vasu wrote: > > Hi, > I am newbie to ansible. You can find it easily through this dump question. > I have limited access

[ansible-project] Re: Ansible become option with passwordless

2016-03-21 Thread Uditha Desilva
2 things: 1) Ansible requires FULL sudo access, i.e selvam ALL=(ALL) NOPASSWD: ALL 2) You may also need to allow sudo for this user to not require a tty: Defaults:selvam !requiretty On Monday, 21 March 2016 13:24:31 UTC, selvam vasu wrote: > > Hi, > I am newbie to ansible. You can find it

[ansible-project] Re: Ansible become option with passwordless

2016-03-21 Thread Uditha Desilva
You probably need to set sudo options to not require a tty, e.g. Defaults:selvam On Monday, 21 March 2016 13:24:31 UTC, selvam vasu wrote: > > Hi, > I am newbie to ansible. You can find it easily through this dump question. > I have limited access to one user(selvam) which can ran limited

[ansible-project] Re: eos_command module waitfor - IP address in json structure

2016-03-21 Thread Martin Baro
Hi, It seems it`s not evaluating the routes[] part: with your waitfor: ValueError: result[0].vrfs.default.routes[1.2.3.4/30].hardwareProgrammed I also tried to index it with [0] without success: ValueError: result[0].vrfs.default.routes[0].hardwareProgrammed On Monday, March 21, 2016 at

[ansible-project] Re: remapping fstab entries from LABEL to UUID --- how?

2016-03-21 Thread Uditha Desilva
I would suggest just getting the whole output of "blkid", then filtering the lines you want with the "search" filter, and then using "regex_replace" to get the bits you want, and finally passing those to the replace module. Be aware, however, that "LABEL=/" is likely to match everything, so you

Re: [ansible-project] remapping fstab entries from LABEL to UUID --- how?

2016-03-21 Thread Brian Coca
The issue is that with_ loops puts results in a list, under 'results' key, so `UUID.item` won't work, you need an index that matches, this might help. http://docs.ansible.com/ansible/playbooks_loops.html#looping-over-a-list-with-an-index On Mon, Mar 21, 2016 at 8:18 AM, Dayton Jones

[ansible-project] Re: eos_command module waitfor - IP address in json structure

2016-03-21 Thread Uditha Desilva
The dotted form is a shorthand for using braces, so maybe this will work: - "result[0].vrfs.default.routes['{{ route }}'].hardwareProgrammed eq true" On Monday, 21 March 2016 16:56:35 UTC, Martin Baro wrote: > > Hi > > I`m trying to catch a specific route in the waitfor statment if it is

[ansible-project] eos_command module waitfor - IP address in json structure

2016-03-21 Thread Martin Baro
Hi I`m trying to catch a specific route in the waitfor statment if it is present from a show ip route output. However I think ansible misinterprets the statement because of the dots in the IP address. (I can successfully test other values like vrfs.default.defaultRouteState ) The playbook: ---

[ansible-project] remapping fstab entries from LABEL to UUID --- how?

2016-03-21 Thread Dayton Jones
I'm trying to read fstab and update any entry that uses "LABEL=" to use the UUID instead.. I can get the proper UUID mappings, but I can't seem to wrap my head around the actual replacement... playbook: - name: Gather UUID mappings shell: "blkid -s UUID -o value -t LABEL={{item}}"

[ansible-project] Re: Playbooks in subdirectories

2016-03-21 Thread Mike Biancaniello
I agree that it's annoying, especially if you try to organize by includes and reusable playbooks, it's hard to tell, looking at a list of *.yml files which ones are the top-level and which are meant to be included. If you're not using roles and only using tasks, you can put your tasks in a

[ansible-project] Re: My first "role" isn't running

2016-03-21 Thread Mike Biancaniello
1. what Uditha said about 'testservers'. 2. By "use multiple plays", I meant to create one play that specifies hosts: testservers, another play that specifies hosts: dev-servers, and a third that specifies hosts: prod-servers. Then, have specific tasks for those servers. Now, re-looking at

Re: [ansible-project] How to use my jenkins variable in remote server (defined from jenkins environment) use jenkins variable

2016-03-21 Thread Anderson, Chad
You could pass the variable through SSH with SendEnv/AcceptEnv, but it would be much easier to modify your shell script to read in $1 then pass the URL variable like: shell: sh /opt/install_script/test.sh "{{ URL }}" On Mon, Mar 21, 2016 at 5:24 AM, Pandithurai S

[ansible-project] Re: win_stat poses an error when i try to get info about a file symbolic link actively in use by a processor

2016-03-21 Thread 'J Hawkesworth' via Ansible Project
It looks like a fix for this has already been made in latest development version of ansible. https://github.com/ansible/ansible/blob/devel/lib/ansible/module_utils/powershell.ps1#L214 Are you able to try latest development version? Jon On Monday, 21 March 2016 05:48:53 UTC, ishan jain wrote:

[ansible-project] acccess my environment variable in remote host

2016-03-21 Thread Pandithurai S
Hi Team, I need to access my jenkins environment variable in the script which i placed in remote host. for ex: -- 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

[ansible-project] Ansible become option with passwordless

2016-03-21 Thread selvam vasu
Hi, I am newbie to ansible. You can find it easily through this dump question. I have limited access to one user(selvam) which can ran limited commands using sudo option. My sudoers file looks like below. selvam ALL=(ALL) NOPASSWD: /usr/sbin/service,/usr/bin/apt-get I have tried to install

[ansible-project] How to use my jenkins variable in remote server (defined from jenkins environment) use jenkins variable

2016-03-21 Thread Pandithurai S
How to use my jenkins variable( (defined from jenkins environment) in remote server using Ansible play book. I am able to get my variable using RPM_URL_PATH = is defined in jenkins environment variable vars: URL: "{{ lookup('env','RPM_URL_PATH') }}" I need to use value of RPM_URL_PATH

Re: [ansible-project] Yumrepo is not being located in ansible 2.1 using Ansible Tower

2016-03-21 Thread Matt Martz
yumrepo was renamed to yum_repository somewhat recently. You will need to use yum_repository instead. My guess is the docs haven't been updated yet. On Sunday, March 20, 2016, Aaron Axisa wrote: > > I am trying to use yumrepo >

Re: [ansible-project] How not to deploy an old version of an ansible playbook?

2016-03-21 Thread Michel blanc
Le 21/03/2016 12:30, poiuytrez a écrit : > Hello, > > We are a team of 10 people. Our ansible playbooks are hosted on a git > repository. It happens that someone deploys an outdated version of a > playbook on machine because he forgot to do a git pull before deploying. > Do you have a strategy

[ansible-project] How not to deploy an old version of an ansible playbook?

2016-03-21 Thread poiuytrez
Hello, We are a team of 10 people. Our ansible playbooks are hosted on a git repository. It happens that someone deploys an outdated version of a playbook on machine because he forgot to do a git pull before deploying. Do you have a strategy to avoid this issue? Thank you for your help,

[ansible-project] Re: use command output to trigger a new task

2016-03-21 Thread matthew . graham
Have you run it in debug to see what the kernalinstalled object looks like? - debug: var=kernalinstalled Also, I do believe the 2 needs to be like '2' as its actually a string not a integer thats returned. I think if you do something like kernalinstalled.stdout|int > 2 that may also work as

[ansible-project] Re: Multiple test conditions for when: not working

2016-03-21 Thread matthew . graham
I have also tried "( '0 to upgrade, 0 to newly install' not in ruby_installed_version.stdout) or ( '0 upgraded, 0 newly installed' not in ruby_installed_version.stdout)" maybe I missed something or there is a better way to test for this... :/ On Monday, 21 March 2016 16:52:38 UTC+11,

[ansible-project] Re: Yumrepo is not being located in ansible 2.1 using Ansible Tower

2016-03-21 Thread Uditha Desilva
Tower isn't using that version of Ansible, I believe it is still using Ansible 2.0 (or possibly earlier). I don't think using arbitrary versions of Ansible is supported with Tower. On Monday, 21 March 2016 05:52:38 UTC, Aaron Axisa wrote: > > > I am trying to use yumrepo >

Re: [ansible-project] Re: Galaxy - Install Role from Subdirectory of Github Repo

2016-03-21 Thread Javier Palacios
If you don't mind making a tarball with the roles, you can use https://github.com/javiplx/ansible-library/, which is basically a install only private galaxy server, from where you can serve your packaged roles (so, it doesn't matter the tree where they live). Javier Palacios On Fri, Mar 18, 2016

Re: [ansible-project] Re: variable for list of targetted hosts

2016-03-21 Thread jocelyn gibart
Yes,it is working, thanks. This is exactly what I was looking for. Le vendredi 18 mars 2016 21:27:03 UTC+1, Brian Coca a écrit : > > the play_hosts var should have that list (unless you are using serial, > which limits it per batch) > > On Fri, Mar 18, 2016 at 1:04 PM, Arthur Reyes