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

2016-03-20 Thread matthew . graham
Hi All I was running an apt_update task and only wanted the server to reboot when it it saw neither of the two lines. Now, what is happening it only sees the first "test" I put in the when: section and ignores the second string to test. The reason for the two tests is I noticed that Debian and

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

2016-03-20 Thread Aaron Axisa
I am trying to use yumrepo https://docs.ansible.com/ansible/yumrepo_module.html and it states that it is new in version 2.1 So i went ahead and updated ansible on my ansible tower machine: sudo yum -y install git asciidoc rpm-build python2-devel cd ~ git clone git://github.com/ansible/ansible.g

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

2016-03-20 Thread ishan jain
I am trying to check if some symbolic links exists or not on a windows 2012 R2 machine using win_file module. It works fine in case of directory symbolic links but poses an error when the path specified is a file symbolic link that is actively being used by a process. This link is a link to jar

Re: [ansible-project] Ansible 2.1.0: "Interactive authentication required." when operating with sudo ?

2016-03-20 Thread Tim Griffin
Hi John, I very much appreciate your attention. When I run "sudo systemctl restart httpd" directly, when logged in as my 'apps' user, I am not prompted for a password. Bizarre, eh? My guess is my httpd configuration... perhaps how Ansible is telling it to restart or how it's choosing to restart

Re: [ansible-project] Ansible 2.1.0: "Interactive authentication required." when operating with sudo ?

2016-03-20 Thread John Favorite
What happens when you run the command as that user? If it still asks for a password either your sudoers file is an issue or user/group might be. On Sun, Mar 20, 2016, 7:37 PM TJG wrote: > Hi John; > > Thanks for the suggestion, but nope: with that line commented out in > sudoers (so that only th

Re: [ansible-project] Ansible 2.1.0: "Interactive authentication required." when operating with sudo ?

2016-03-20 Thread TJG
Hi John; Thanks for the suggestion, but nope: with that line commented out in sudoers (so that only the one with NOPASSWD is in effect", the error is the same. "Failed to stop httpd.service: Interactive authentication required." Besides, I'd have thought that the latter statement would have o

Re: [ansible-project] Ansible 2.1.0: "Interactive authentication required." when operating with sudo ?

2016-03-20 Thread John Favorite
comment out #%wheel ALL=(ALL) ALL ## Same thing without a password %wheel ALL=(ALL) NOPASSWD: ALL On Sun, Mar 20, 2016 at 4:11 PM, TJG wrote: > Hi all; > > Just looking for a little help to spot what I might be missing. Against a > Centos 7 box, using Ansible 2.1.0, this task: > >

[ansible-project] Ansible 2.1.0: "Interactive authentication required." when operating with sudo ?

2016-03-20 Thread TJG
Hi all; Just looking for a little help to spot what I might be missing. Against a Centos 7 box, using Ansible 2.1.0, this task: - name: restart httpd service: name: httpd state: restarted is giving me an "Interactive authentication required." error when run under Ansible

Re: [ansible-project] Re: But in iptables module?

2016-03-20 Thread Martin Terp Jensen
I belive you need to use "match: conntrack" instead of "match: state" when using ctstate On Sun, Mar 20, 2016 at 6:41 AM, Dejay Clayton wrote: > Looks like a bug to me. > > -- > You received this message because you are subscribed to the Google Groups > "Ansible Project" group. > To unsubscribe

[ansible-project] Re: But in iptables module?

2016-03-20 Thread Martin Terp Jensen
I belive you need to use "match: conntrack" instead of "match: state" when using ctstate On Friday, March 18, 2016 at 10:07:49 PM UTC+1, Joshua Kugler wrote: > > I'm trying to use the iptables module, and I *think* I'm hitting a bug. > Wanted > a sanity check before I open a bug report. This is

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

2016-03-20 Thread Peter Zoltan Keresztes
Hello, I am trying to remove unused kernel packages when the command output is larger than 1 the tasks looks like this: - name: Check if kernel upgrade is available command: dpkg -l linux-image* | grep ii | wc -l 2>&1 register: kernelinstalled - name: Delete unused linux kernels comm

Re: [ansible-project] Change of behaviour of delagate_to between Ansible 1.9.4 and 2.0.1.0

2016-03-20 Thread Jon B
I've just tested against devel and can confirm that has issue is resolved. Thanks On Friday, March 18, 2016 at 5:39:28 PM UTC, Brian Coca wrote: > > Check against current devel, we just fixed an issue with delegation > connection vars not being set correctly. > > > -- > Brian Coca > --

Re: [ansible-project] Re: How to force creating a new ssh connection

2016-03-20 Thread John Favorite
Here is an article I came across that solves an issue I had: https://dmsimard.com/2016/03/15/changing-the-ssh-port-with-ansible On Fri, Mar 18, 2016, 4:26 PM Brian Coca wrote: > you can run a command to kill the connection locally: > > ssh -O stop -o > ControlPath=~/.ansible/cp/ansible-ssh--22-

[ansible-project] Openstack os_network - Binding: VNIC Type

2016-03-20 Thread John Favorite
Hello, I am trying to modify the Binding: VNIC Type of an instance. It does not seem to be supported in the OS network modules. I took a look on github and it does not appear to have code to support this feature. Any ideas? -- You received this message because you are subscribed to the Google Gr

[ansible-project] OpenStack os_server os_volume multiple instance launch

2016-03-20 Thread John Favorite
Hello, I am trying to launch/create multiple instances and attach multiple volumes with a loop but not having much luck. I can get it to work if I define each instance/volume but who wants to do that? Ideally I would set a var that says something like make 100 instances. Below is an example of wha

[ansible-project] Re: Provisioning OpenStack with Ansible from scratch, missing modules?

2016-03-20 Thread Thiago Martins
Thanks for sharing Larry! I'll take a look at your automation... Cheers! On Sunday, March 13, 2016 at 9:57:17 PM UTC-3, Larry Smith wrote: > > I did this exact same thing a few months ago but using Kilo and Ubuntu > 14.04LTS which may be of some use to you. However I did use some of the > module

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

2016-03-20 Thread Arthur Reyes
$ ansible -i INVENTORY all -m setup --limit vm04 --list-hosts On Friday, March 18, 2016 at 3:00:15 PM UTC-5, jocelyn gibart wrote: > > Hello dear Ansible wizards > > Is there a way to get the list of targetted hosts for a playbook or for a > role ? > > I didnt find any variable or any way to get

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

2016-03-20 Thread Gilberto Valentin
Mike, I got a bit further with your suggestion. I changed my tree to look like the one you have and now it looks like it's trying to kick. However, now it's not finding the value of my *hosts: *"{{ test }}" When I run the command, I see this now: [WARNING]: provided hosts list is empty, only l

Re: [ansible-project] How to pass command line arg as input for dynamic-inventory executable program during ansible-playbook launch

2016-03-20 Thread Benjamin Redling
On 2016-03-20 12:18, Naren wrote: > Environment variable kind of solution is good as long as I call my > playbooks from console. But when it comes to automation by integrating with > external systems; the inventory generator/builder should be good enough to > pull inventory artifacts from databa

Re: [ansible-project] How to pass command line arg as input for dynamic-inventory executable program during ansible-playbook launch

2016-03-20 Thread Naren
Environment variable kind of solution is good as long as I call my playbooks from console. But when it comes to automation by integrating with external systems; the inventory generator/builder should be good enough to pull inventory artifacts from database, REST APIs,... All I need is something

Re: [ansible-project] how to replace windows style line endings with linux in the replace task?

2016-03-20 Thread Johannes Kastl
Hi, Am 16.03.16 schrieb Vikram Kone: > I tried this, but doesnt seem to work > > - name: Fix line endings from CRLF to LF > local_action: replace dest={{my_dir}}/conf/{{item}} regexp='\r\n' > replace='\n' > On a unix machine (Linux, BSD, ...) I would use dos2unix or similar... Johannes --

[ansible-project] Re: How to pass command line arg as input for dynamic-inventory executable program during ansible-playbook launch

2016-03-20 Thread Naren
Ubuntu On Sunday, 20 March 2016 10:54:32 UTC+5:30, Dejay Clayton wrote: > > What operating system are you using to execute ansible-playbook? >> >> >> -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop rec

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

2016-03-20 Thread Brian Coca
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 wrote: > $ ansible -i INVENTORY all -m setup --limit vm04 --list-hosts > > > On Friday, March 18, 2016 at 3:00:15 PM UTC-5, jocelyn gibart wrote: >> >>

[ansible-project] Re: Check existence and state of a service on windows machine using win_service

2016-03-20 Thread ishan jain
Agreed with your point - we should drag the machine in the state we want. But in my case the number 1 priority is to make the script idempotent, which seems like quite a thing on windows end. I not installing anything on the windows end and my application will run as standalone service, no inst

Re: [ansible-project] OpenStack Dynamic Inventory Question

2016-03-20 Thread Mike Albert
I thought upgrading to shade 1.5.1 resolved our inventory issue but on second glance, openstack.py --list is not returning all the compute instances in our environment. We tested the old openstack dynamic inventory script (https://github.com/ansible/ansible/blob/devel/contrib/inventory/nova.py

[ansible-project] accessing localhost with dynamic hosts for limited tasks

2016-03-20 Thread Daniel Boland
I'm trying to access localhost when i specify other remote hosts (using ec2 dynamic inventory but not sure if that matters). But i get this: PLAY *** skipping: no hosts matched Trying to figure out if its an access thing