Re: [ansible-project] Re: ERROR! Invalid shell type specified (bash), or the plugin for that shell type is missing.

2016-02-03 Thread Aneesh Joseph
I'm also facing the same issue, if I set ansible_shell_type=sh when I use executable=/bin/bash, it works. On Tuesday, June 30, 2015 at 10:06:03 AM UTC+5:30, Brian Coca wrote: > > ok, so it seems we just need to make sure when we have bash as the > executable to set the shell type to sh > > --

[ansible-project] Re: Need help with nested variables to use in a "when:" directive inside of a role playbook

2016-02-03 Thread Igor Cicimov
Try this: - name: Ensure user directory exists file: path=/opt/{{ item.item }} state=directory owner={{ item.item }} group={{ item.item }} mode=0755 with_items: passinfo.results not tested though. On Wednesday, February 3, 2016 at 7:48:21 A

[ansible-project] Ansible 2 multiple extra vars files

2016-02-03 Thread Mark Olliver
Hi When running a playbook via Ansible-playbook with the --extra-vars flag I can supply the argument multiple times and all the vars get combined. My question is what is the order of inheritance within the files if I were to supply the same car in both. For example may be I have a default set o

[ansible-project] Re: Do I need to use Kerberos or Windows domain authentication to have Ansible manage Windows servers?

2016-02-03 Thread Kiran
I wonder why it is trying to connect via SSH and not via the username and password. -- 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.

[ansible-project] Re: Do I need to use Kerberos or Windows domain authentication to have Ansible manage Windows servers?

2016-02-03 Thread Kiran
I tried using the wrong password on purpose. But that had no affect, and the problem was reproducible. I tried changing the port to 5984. This produced a different error. The time it takes before failing is longest when I use port 5986. So I think I should use port 5986. Where do I create t

[ansible-project] Re: winrm

2016-02-03 Thread Nikhil Shah
I'd like to thank you all, i was able to resolve my windows issue. Few things I had to do was the following: 1. Use Ubuntu instead of CentOS (which is not the reason for the issues) 2. Install PBIS and set that stuff up 3. Follow the instructions on http://docs.ansible.com/ansible/intro_windows.

[ansible-project] Re: winrm

2016-02-03 Thread Nikhil Shah
sorry for buggin you all soo much, but i feel im almost there! root@ansible02:/etc/ansible# ansible windows -m win_ping - Using /etc/ansible/ansible.cfg as config file Loaded callback minimal of type stdout, v2.0 <10.40.1.31> ESTABLISH WINRM CONNECTION FOR USER: agent@domain.LOCAL on PORT

[ansible-project] Re: winrm

2016-02-03 Thread Nikhil Shah
OK, so i setup a new ubuntu serer and followed instructions on tying to domain and looks to be successful...here is the latest error: root@ansible02:/etc/ansible# ansible windows -m win_ping - Using /etc/ansible/ansible.cfg as config file Loaded callback minimal of type stdout, v2.0 An ex

[ansible-project] Re: How do I get the Ansible plugin to work with Jenkins?

2016-02-03 Thread jonten
Hi Kiran, I suspect that the Ansible plugin for Jenkins only looks for a locally installed Ansible binary. See the example at the plugin page: https://wiki.jenkins-ci.org/display/JENKINS/Ansible+Plugin Cheers, //Jon On Wednesday, February 3, 2016 at 2:46:55 AM UTC+1, Kiran wrote: > My Ansible

[ansible-project] Re: How do I get the Ansible plugin to work with Jenkins?

2016-02-03 Thread jonten
Hi Kiran, I suspect that the Ansible plugin for Jenkins only looks for a locally installed Ansible binary. See the example at the plugin page: https://wiki.jenkins-ci.org/display/JENKINS/Ansible+Plugin Cheers, //Jon On Wednesday, February 3, 2016 at 2:46:55 AM UTC+1, Kiran wrote: > My Ansible

Re: [ansible-project] parameterized first found

2016-02-03 Thread Brian Coca
fixed in https://github.com/ansible/ansible/pull/14281, will be out in the next releases -- 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+unsu

[ansible-project] Re: ec2_vpc_route_table module

2016-02-03 Thread Arbab Nazar
Can you please remove this and install via pip. I have install the ansible 2 via pip and this module worked for me. Step on ubuntu: # sudo apt-get install python-pip # sudo pip install ansible On Wednesday, February 3, 2016 at 9:32:07 PM UTC+5, Christian Del Pino wrote: > > Example I currently

[ansible-project] win_nssm task shows 'changed' for every run

2016-02-03 Thread Joe Levis
Ubuntu 14.04, Ansible 2.0.0.2 I'm using win_nssm to install a service. It's successfully installing the service, however all subsequent runs show the win_nssm task as 'changed'. Why is win_nssm showing 'changed' even though the service has already been installed and nothing has been modified? I

[ansible-project] Re: winrm

2016-02-03 Thread Joe Levis
Right, so like I said in my previous response: make sure your Linux box is registered on the Windows domain. Run 'dnsdomainname' to check if your Linux machine is joined to a domain. If not, you need to use something like PBIS to do so: https://community.spiceworks.com/how_to/80336-join-ubuntu-14

[ansible-project] "role" variable

2016-02-03 Thread Warren Seine
Hi, In Ansible 1.9.4, I was able to use role as a variable to get the current role name. In Ansible 2, the variable does not seem to be defined. Any replacement? role_path is defined so I could use {{ role_path | basename }}, but that's less convenient. -- You received this message because y

[ansible-project] Re: winrm

2016-02-03 Thread Nikhil Shah
Just an update, but still having issuesI realized I was using ansible 1.9.4 and the syntax is a bit different than ansible 2.0 (e.g ansible_ssh_user vs. ansible_user), now seeing this error: [root@bamagent06 ansible]# ansible windows -m win_ping - ESTABLISH WINRM CONNECTION FOR USER:

[ansible-project] Re: winrm

2016-02-03 Thread Joe Levis
Nikhil, I ran into many problems getting kerberos to work with ansible as well, but finally got it working. First, ensure that you've obtained a valid kerberos ticket by running 'klist' on the command line after running your kinit command. Please post that back here if you can. Second, make su

[ansible-project] Re: bug with "become" and "delegate_to" directives and loops with Ansible 2

2016-02-03 Thread fabix
Hmm, with ansible-playbook 2.1.0, that works. So, the bug is already fixed. Sorry for the noise. -- 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-proj

[ansible-project] Re: ec2_vpc_route_table module

2016-02-03 Thread Christian Del Pino
Example I currently have in place: - name: Set up Internal Subnet route table ec2_vpc_route_table: vpc_id: "{{ vpc.vpc_id }}" region: "{{ aws_region }}" subnets: - "{{ subnet_internal }}" routes: - dest: 0.0.0.0/0 instance_id: "{{ nat.instance[0]id }}" when:

[ansible-project] Re: winrm

2016-02-03 Thread Nikhil Shah
I've tested kerberos following http://docs.ansible.com/ansible/intro_windows.html#id9. I ran kinit user@DOMAIN.LOCAL and it doesn't come back with anything but it also doesn't come back with a failure. I also try inputting the wrong password on purpose and it throws a "kinit: Preauthenticat

[ansible-project] Re: winrm

2016-02-03 Thread Nikhil Shah
That's a good start, I am using CentOS, and I was able to run yum install python-kerberos just now. However, still seems to be getting same message when rerunning: Installed: python-kerberos.x86_64 0:1.1-15.el7

[ansible-project] bug with "become" and "delegate_to" directives and loops with Ansible 2

2016-02-03 Thread fabix
I've written this little playbook to show the problem: - name: test become hosts: localhost serial: 1 tasks: - name: create test directories file: path=/tmp/test/{{ item }} state=directory with_items: - one - two delegate_to: localhost become: true It's not very

[ansible-project] Random undefined variables (facts) since ansible 2.0 upgrade

2016-02-03 Thread Michael Baydoun
Some ansible playbook runs will work on most hosts, but 1-3 will fail with an undefined variable that is an ansible fact. Run it a second time and it works. Example: fatal: [wdv-sitefinity1]: FAILED! => {"failed": true, "msg": "ERROR! The conditional check 'ansible_os_family == 'Windows'' fail

[ansible-project] win_environment module

2016-02-03 Thread Shmulik Alfandari
Hi, I am trying to add specific path to the Path Environment Variables on windows hosts using win_environment module The problem is that this module can only add new variable or delete existing one, it's impossible to add something to existing variable. Is there any other way to update Path Env

[ansible-project] Re: ansible log_plays.py callback plugin not working with ansible 2.0.1 as expected

2016-02-03 Thread Ankit Kulkarni
On Wednesday, February 3, 2016 at 7:41:53 PM UTC+5:30, J Hawkesworth wrote: > > Yes the internal ansible APIs have changed in v2 > > Have a look at the other plugins in your ansible installation. > > For example > > site-packages/ansible/plugins/callback/timer.py > > You will notice that the plugi

Re: [ansible-project] Callbacks: v2_runner_on_ok vs v2_playbook_item_on_ok?

2016-02-03 Thread Brian Coca
v2_playbook_item_on_ok is not called 'yet', it is there as placeholder for when we reintroduce returning info per item, currently in 2.0 we return all info at the end of the loop, which is not optimal (there are open tickets on this issue). -- Brian Coca -- You received this message because y

Re: [ansible-project] SSH Issue with HP switch Comware 7

2016-02-03 Thread Денис Авзалов
Yes, I saw this post. This is additional module for Comware *5. *I am working with 7. Anyway, I tried it, but no success. Denis. среда, 3 февраля 2016 г., 18:35:13 UTC+6 пользователь Matt Martz написал: > > A quick Google search after my email led me to > http://patg.net/ansible,comware,switc

[ansible-project] Ansible Python API 2.0

2016-02-03 Thread Shreyas Patil
Hi, I am trying to build an ansible system using its Python API. But, documentation related to any of the API's is just not available anywhere on the ansible website. I would be grateful to anyone who can route me to a proper documentation for API, more specifically PYTHON API 2.0 regards, _

[ansible-project] docker_containers fact is empty when container already started

2016-02-03 Thread Clément Prévost
Hi all, I've been trying the docker module as a way to provision containers for a local development environment. I'm facing some issues. - I declare only one host in my inventory named docker-host - I expect the docker module to build an ssh-enabled base image and start some containers - I regi

[ansible-project] Callbacks: v2_runner_on_ok vs v2_playbook_item_on_ok?

2016-02-03 Thread Konstantin Suvorov
Hello. I need to get some feedback from ansible runs. I use custom callbacks for this task. Could someone describe difference between *v2_runner_on_ok* vs *v2_playbook_item_on_ok* methods? During my test runs I see that the *v2_runner_on_ok* is called when tasks are done, but when is *v2_playb

[ansible-project] Re: ansible log_plays.py callback plugin not working with ansible 2.0.1 as expected

2016-02-03 Thread J Hawkesworth
Yes the internal ansible APIs have changed in v2 Have a look at the other plugins in your ansible installation. For example site-packages/ansible/plugins/callback/timer.py You will notice that the plugins now subclass CallbackModule. Another change in Ansible 2.0 is that you can just whitelist

[ansible-project] Re: ansible log_plays.py callback plugin not working with ansible 2.0.1 as expected

2016-02-03 Thread tinyzais
I believe you should use 'v2_' versions of functions in 2.0 On Wednesday, February 3, 2016 at 4:23:05 PM UTC+3, Ankit Kulkarni wrote: > > We are using ansible in our production and our log_plays callback plugin > just broke after upgrading from 1.9.4 to 2.0.0.1 . > > I need to put my custom lo

[ansible-project] Re: winrm

2016-02-03 Thread J Hawkesworth
You have ansible_user: user@domain.local set, implying that you want to use a domain user. When you run, the following is shown: transport=plaintext endpoint=https://X:5986/wsman The transport needs to be kerberos to connect with a domain user. I suspect you ar

[ansible-project] ansible log_plays.py callback plugin not working with ansible 2.0.1 as expected

2016-02-03 Thread Ankit Kulkarni
We are using ansible in our production and our log_plays callback plugin just broke after upgrading from 1.9.4 to 2.0.0.1 . I need to put my custom logging using log_plays.py ( say store the results in a sqllitedb for later analysis ) . The same was working fine till ansible 1.9.4 . I am usin

Re: [ansible-project] SSH Issue with HP switch Comware 7

2016-02-03 Thread Matt Martz
A quick Google search after my email led me to http://patg.net/ansible,comware,switches/2014/10/16/ansible-comware/ That post details what was done and appears to offer links to the modules that he wrote. On Wednesday, February 3, 2016, Matt Martz wrote: > There was another user (I believe who

Re: [ansible-project] SSH Issue with HP switch Comware 7

2016-02-03 Thread Matt Martz
There was another user (I believe who worked for HP) who was trying to work with these switches at one point. In order to use them he had to write a custom module that utilized paramiko to perform the communication, as opposed to using The Ansible paramiko communication plugin. On Tuesday, Februa

Re: [ansible-project] Ansible fails to pass a simple shell command to an AIX server : error message "SyntaxError: invalid syntax\r\n", "msg": "MODULE FAILURE"

2016-02-03 Thread Matt Martz
That error is due to the playbook running the setup module during the gather facts step and not having python2 available at /use/bin/Python but instead having python3. If you are just trying to run script without running setup, add `gather_facts: false` to your play definition. Otherwise you will

[ansible-project] Ansible Role dependencies After Role

2016-02-03 Thread ProfHase
Hello, how do I declare a role dependency which is executed after the role, e.g. : After every execution of role A, role B is executed According to this ons: http://docs.ansible.com/ansible/playbooks_roles.html#roles the roles in 'dependencies' are executed before. The Background: My Role A s

Re: [ansible-project] Access facts in custom filter plugin

2016-02-03 Thread Łukasz Górski
I hoped for some clever hack... Thanks anyway :) Best regards, Łukasz Górski W dniu wtorek, 2 lutego 2016 15:41:06 UTC+1 użytkownik Brian Coca napisał: > > filter plugins don't have access to anything except the arguments > passed directly: > > arg1 | filter(arg2, arg3, ...) > > > > -- > Bria

Re: [ansible-project] host_vars with .yml

2016-02-03 Thread Warren Seine
Ok, I'm wrong. The host_vars directory was at the wrong place. It does pick the .yml file. Sorry for not checking properly. On Wed, Feb 3, 2016 at 10:09 AM, Warren Seine wrote: > I understand the order of precedence, but local.yml doesn't get picked up > even if there is no local. > > On Tue, Fe

Re: [ansible-project] host_vars with .yml

2016-02-03 Thread Warren Seine
I understand the order of precedence, but local.yml doesn't get picked up even if there is no local. On Tue, Feb 2, 2016 at 10:21 PM, Brian Coca wrote: > no, this is the matching order precedence "", ".yml", ".yaml", > ".json", so local will be picked up if it exists in preference over > local.