[ansible-project] Re: Powershell script not completely executing...

2015-07-30 Thread J Hawkesworth
What ansible version are you using? If I recall we had a problem in the past with execution policy being set differently under some circumstances, which I speculate might be causing your problems. As a 'get-you-going' suggestion, you could try running the problematic commands (without the star

[ansible-project] Re: Problem with parameterizing role

2015-07-30 Thread Paul Markham
Don't you just need one task in your role which takes the dir variable? Something like: template: src=server.xml.j2 dest={{dir}}/server.xml owner=tomcat7 group=nogroup mode=0600 -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscrib

[ansible-project] Re: Problem with parameterizing role

2015-07-30 Thread Igor Cicimov
You forgot to include condition in the tasks, like for example: - name: Template to 1st server.xml template: src=server.xml.j2 dest=/var/opt/tomcat_1/conf/server.xml owner=tomcat7 group=nogroup mode=0600 when: port == "5000" - name: Template to 2nd server.xml template: src=server.xml.j2

Re: [ansible-project] Re: ERROR: Invalid ini entry

2015-07-30 Thread Toshio Kuratomi
On Wed, Jul 22, 2015 at 12:49 AM, Юра Фролов wrote: >> Can you upload your actual inventory file somewhere for us to download and >> take a look? I've just tested and one way that error can happen is if >> there's trailing, non-ascii whitespace > > inventory file > Very first line of this invent

[ansible-project] Re: Powershell script not completely executing...

2015-07-30 Thread O haya
Hi, FYI, I've also tried changing from using Start-Process to Invoke-Command, but it still seems to do the same thing (hangs) when I try to run the ps1 via Ansible. I don't know if this'll help, but here's the output with -: Enter code here... [root@centos65 ansible_test]# ansible windows

[ansible-project] Re: Powershell script not completely executing...

2015-07-30 Thread O haya
Hi, It seems like when the .ps1 is run under Ansible, the two lines with "Start-Process" are not executing. The first one, which runs setup.exe is supposed to cause copying the Sharepoint files, etc. and then the second is supposed to run psconfig.exe. I've also tried modifying the ps1 file

Re: [ansible-project] Re: How to debug very simple hanging playbook

2015-07-30 Thread Olivier Lauret
Hi All, I finally found the issue. It is related to the bug #9847 . If the user doesn't have a home folder assign, we have this issue. The workaround is pretty easy and well explained in the bug report. Thank you @arlinton and Brian for your help

[ansible-project] Powershell script not completely executing...

2015-07-30 Thread O haya
Hi, I have started trying to replicate some of the things that we are currently doing with Chef, but with Ansible. One of these is installing Microsoft Sharepoint (on Windows 2008 R2). In Chef, I do this using some Powershell scripting, so I am trying to do that with Ansible. I am using this

Re: [ansible-project] Rolling deploys to groups of servers

2015-07-30 Thread Guy Matz
Great! That looks like it'll work! What's another way? ;-) Thanks, Guy On Wed, Jul 29, 2015 at 7:13 PM, Brian Coca wrote: > several, one way is: > > - hosts: app*_server1:app*_server2:app*_server3 > serial: 3 > > > -- > Brian Coca > > -- > You received this message because you are subscrib

Re: [ansible-project] Error with Hipchat callback library

2015-07-30 Thread Samnang Sen
Ugh, just caught there. thx Any idea when v2 will become stable? On Thursday, July 30, 2015 at 11:56:09 AM UTC-4, Brian Coca wrote: > > you are running the callback plugin from devel, which is incompatible > with previous versions. > > On Thu, Jul 30, 2015 at 11:41 AM, Samnang Sen > wrote: >

Re: [ansible-project] Error with Hipchat callback library

2015-07-30 Thread Brian Coca
you are running the callback plugin from devel, which is incompatible with previous versions. On Thu, Jul 30, 2015 at 11:41 AM, Samnang Sen wrote: > Running Ansible v1.9.2 > > File "/usr/share/ansible_plugins/callback_plugins/hipchat.py", line 28, in > > from ansible.plugins.callback import

[ansible-project] Re: Programmatically checking if a particular host is still a target.

2015-07-30 Thread KSS
I think this may help; {{ play_hosts[0] }} That should pick the first host in the current play (so no previous failures) On Thursday, 30 July 2015 16:20:10 UTC+1, Jan Grant wrote: > > So I've a situation where I want to delegate_to a host. That host is one > (arbitrarily chosen) of a group. >

[ansible-project] Error with Hipchat callback library

2015-07-30 Thread Samnang Sen
Running Ansible v1.9.2 File "/usr/share/ansible_plugins/callback_plugins/hipchat.py", line 28, in from ansible.plugins.callback import CallbackBase ImportError: No module named plugins.callback -- You received this message because you are subscribed to the Google Groups "Ansible Proje

Re: [ansible-project] Re: Ansible not pulling in group_vars

2015-07-30 Thread datsun80
Yes, I mistyped. This is in my site.yml file: - name: Redis Server hosts: redis sudo: yes roles: - { role: redis, tags: ['redis'] } On Thursday, July 30, 2015 at 10:29:12 AM UTC-5, Guy Matz wrote: > > Is that your inventory? Or your site.yml? > > > -- You received this message becau

Re: [ansible-project] Re: Ansible not pulling in group_vars

2015-07-30 Thread Guy Matz
Is that your inventory? Or your site.yml? On Thu, Jul 30, 2015 at 9:21 AM, datsun80 wrote: > Yes, the hosts folder contains the inventory files. > > I am calling it like so: > ansible-playbook -i hosts/qa -t redis site.yml > > In the inventory file I have: > > - name: Redis Server > hosts: re

[ansible-project] Re: A logging plugin

2015-07-30 Thread Dave Thomas
Chris: You're right. Fixed. Thanks Dave On Thu, Jul 30, 2015 at 9:24 AM Chris McDonald wrote: > Hi > > Thanks very much for this. Its just what I'm looking for. > > I wonder however, might it contain a small bug? stdout and stderr are both > being output in yellow always rather than stderr b

[ansible-project] Programmatically checking if a particular host is still a target.

2015-07-30 Thread jang
So I've a situation where I want to delegate_to a host. That host is one (arbitrarily chosen) of a group. Rather than delegate_to: "{{ GROUP[0] }}" I'd like to confirm that the host is actually up, first - or rather, pick an arbitrary member of GROUP that's successfully had facts gathered aga

Re: [ansible-project] when list of strings NOT IN hostname

2015-07-30 Thread Chris Short
Thanks, Tim that is very helpful. I have a ton of groups already and am trying to minimize them and not pile on. I could do this with host_vars (since it is lines in configuration files that are different). I didn't think of that until I read your response so I definitely am thankful. On Thurs

Re: [ansible-project] when list of strings NOT IN hostname

2015-07-30 Thread Timothy Gerla
I am not sure why you would be avoiding inventory groups, since they're built for this purposebut you probably want: when: "abc" not in inventory_hostname and "def" not in inventory_hostname and "ghi" not in inventory_hostname -Tim On Thu, Jul 30, 2015 at 10:19 AM, Chris Short wrote: > I'm

[ansible-project] when list of strings NOT IN hostname

2015-07-30 Thread Chris Short
I'm trying to get a configuration deployed to a large group of hosts except for a few specific ones. I am trying very hard to not use an inventory group to manage this. I've tried a few different methods and cannot seem to get it to work. Here are examples of what I've tried: when: '"abc":"def"

[ansible-project] Re: A logging plugin

2015-07-30 Thread Chris McDonald
Hi Thanks very much for this. Its just what I'm looking for. I wonder however, might it contain a small bug? stdout and stderr are both being output in yellow always rather than stderr being output in bright red which is preferable. I think that the following fixes this: def display_output(out

[ansible-project] Re: Ansible not pulling in group_vars

2015-07-30 Thread datsun80
Yes, the hosts folder contains the inventory files. I am calling it like so: ansible-playbook -i hosts/qa -t redis site.yml In the inventory file I have: - name: Redis Server hosts: redis sudo: yes roles: - { role: redis, tags: ['redis'] } On Wednesday, July 29, 2015 at 6:11:25 PM UT

[ansible-project] Re: Rolling deploys to groups of servers

2015-07-30 Thread Offer Sharabi
Hi Guy, First you need a way to refer to your servers in the required release order. Easy way is to just have them as a group in your host file such as: [servers] server1 server2 server3 ... serverN Then in your rolling deploy playbook, you refer to this group as hosts, and use serial=1 if you

Re: [ansible-project] Does the file module handle wildcards?

2015-07-30 Thread Craig Moynes
Sorry if I wasn't clear. I am running 1.9.2 and I use command module to execute a find on a remote system to get a list of files, then used the file module to check the state. Is that clearer? On Wed, Jul 29, 2015 at 9:13 PM Willard Dennis wrote: > Thanks for the tip, but not running 2.0 yet...

Re: [ansible-project] Using dictionary keys as a list in with_items

2015-07-30 Thread Mischa ter Smitten
Thanks for the great tip! with_items: "{{ databases.keys() }}" also seems to work, but then you would have no access to the values :-) On Sunday, May 19, 2013 at 1:34:14 AM UTC+2, Kahlil Hodgson wrote: > > Here's and example using the Jinja2's dictsort filter to turn a dictionary > into a list

[ansible-project] Limit the number of hosts, or using [x] on groups intersection

2015-07-30 Thread Tzach Livyatan
Hello My real desire is to limit the number of hosts for a playbook. Since --limit does not support that (AFAIK), I'm using A[0-x] for this, but here is the thing: My playbook limit the hosts to A:&B I would like to do something like : --limt "(A:&B)[0-x]", in the CLI, limiting the number of host

[ansible-project] Failed to install rpm package with yum module

2015-07-30 Thread Tim John
Hey guys, I've encountered a weird problem with *yum *module. Working environment: *OS*: CentOS 6.4 *Kernel*: 2.6.32-358.e16.x86_64 *Ansible*: 2.0.0 (devel b37be236d9) running from source I'd like to install *Erlang *in *CentOS 6.4*, to do that " *erlang-solutions-1.0-1.noarch.rpm*" must be insta

Re: [ansible-project] Re: ERROR: Invalid ini entry

2015-07-30 Thread Martin
Hi, * Are your control and target host Linux machines? * What happens if you remove the ansible.cfg file? * Try to enable settings line by line to find out what the offending line is Can you post a complete and repeatable version of your: * ansible config * ansible playbook * info on the ansible

[ansible-project] How are you using tags?

2015-07-30 Thread J Hawkesworth
We have built up quite a collection of playbooks during the time we've been using ansible and I'm looking for ways to consolidate them, just to keep them under control as we still have plenty more we want to add. I've not made use of tags yet but read up on it a bit and am thinking of organisin

[ansible-project] Re: ansible command or shell: vagrant add box ubuntu/trusty64

2015-07-30 Thread Mischa ter Smitten
Try to quote the command -- 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...@googlegroups.com. To post to this group, send email to an