Re: [ansible-project] why is this task hanging? (shell module)

2015-07-06 Thread Willard Dennis
Thanks for the response, Brian. Just doing a quick-n-dirty testbed setup 
via Ansible involving Consul, so the 'nohup' tip will work for now.

- Will

On Sunday, July 5, 2015 at 8:01:24 PM UTC-4, Brian Coca wrote:
>
> The reason it is 'hanging' is because you are not detaching from the 
> console, this is not the recommended way of running services, I would 
> use an init/rc script or upstart/systemd config. But if you MUST do it 
> this way, try prepending nohup. 
>
>
>
> -- 
> Brian Coca 
>

-- 
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 ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/158c475c-77ce-439c-a3d9-ed08135743db%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Send playbook output to Logstash/Elasticsearch

2015-07-06 Thread David Reagan
The default log_plays doesn't actually output all the information I need.

I have lots of stuff going to syslog and then into ELK already, but in this
case, I figured I'd just let logstash-forwarder watch the ansible log file.
Then format the output so that logstash doesn't have to filter it at all.

Currently, I figured out how to get valid json out per line. But I'm stuck
figuring out how to get the task name, the role name, and the command line
command information.

Are there global vars I can reference from the plugin? Where could I find a
list of them?


--David Reagan

On Mon, Jul 6, 2015 at 5:25 PM, Brian Coca  wrote:

> log_plays was designed to drop the json to syslog-ng which would then
> push it to elastic search w/o need for logstash, probably easier to
> just setup syslog-ng to do the same.
>
>
> --
> Brian Coca
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Ansible Project" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/ansible-project/zOjsYxLN578/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> ansible-project+unsubscr...@googlegroups.com.
> To post to this group, send email to ansible-project@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/CAJ5XC8n722sXnV547ZCjrTxBeaDQOqxzxQ1QEs0fYeq5AuQ6Sg%40mail.gmail.com
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CANo%2B_AcRMnkzn-atKOPtN7kLwQdFTxDyAi%2BJYn2g5TmFRAikqg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Send playbook output to Logstash/Elasticsearch

2015-07-06 Thread Brian Coca
log_plays was designed to drop the json to syslog-ng which would then
push it to elastic search w/o need for logstash, probably easier to
just setup syslog-ng to do the same.


-- 
Brian Coca

-- 
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 ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAJ5XC8n722sXnV547ZCjrTxBeaDQOqxzxQ1QEs0fYeq5AuQ6Sg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: Unable to set up NFS on EC2 instances launched using Ansible

2015-07-06 Thread Luke Valenta
Bug solved. I was not specifying the correct security group. I had confused 
ansible groups with ec2 security groups in my code.


On Monday, July 6, 2015 at 6:00:03 PM UTC-4, Luke Valenta wrote:
>
> Hi,
>
> I am unable to get NFS configured correctly on EC2 instances launched via 
> the 'ec2' module in Ansible. When I launch instances using the exact same 
> AMI from the AWS EC2 console, NFS works without a hitch.
>
> First I'll describe my setup, and then how to reproduce the problem. I'm 
> running Ansible from a Mac OSX Yosemite version 10.10.3.
>
> $ ansible --version
> ansible 1.9.2
>
> I was also able to reproduce the problem from a machine running Debian 8.1 
> with Ansible version 1.9.
>
> This is the ansible playbook I'm using to launch 2 ec2 instances.
>
> $ cat test-nfs.yml
> - hosts: localhost
>   tasks:
>- ec2:
>   key_name: my_key
>   aws_region: us-east-1
>   zone: us-east-1c
>   image: ami-d05e75b8
>   vpc_subnet_id: subnet-cba9efbc
>   instance_type: t2.micro
>   exact_count: 2
>   count_tag:
> Name: nfs-test
>   instance_tags:
> Name: nfs-test
>   assign_public_ip: yes
>   wait: yes
>
> Launch two instances.
>
> $ ansible-playbook -i ./ec2.py test-nfs.yml
>
> Then, SSH into the first instance and set up NFS.
>
> $ ssh ubuntu@
> $ sudo mkdir -m 777 /test
> $ sudo apt-get install nfs-kernel-server
> $ sudo cat "/test*(rw,async,no_subtree_check)" >> 
> /etc/exports
> $ sudo service nfs-kernel-server restart
>
> Attempt to mount NFS on the second instance.
>
> $ sudo mkdir -m 777 /test
> $ sudo apt-get install nfs-common
> $ sudo mount :/test /test
>
> The last step (mounting /test) hangs and times out if the instances were 
> launched using the ansible ec2 module, but completes almost instantly when 
> the instance are launched from the AWS EC2 console or using the AWS CLI.
>
> $ aws ec2 run-instances --image-id ami-d05e75b8 --count 1 
> --instance-type t2.micro --key-name test --security-group-ids sg-8fd0f7eb 
> --subnet-id subnet-cba9efbc
>
> Any help would be greatly appreciated. I can provide additional 
> information about the setup if requested.
>

-- 
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 ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/29b018ca-208a-4fe9-9853-bddf0e8cd066%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Send playbook output to Logstash/Elasticsearch

2015-07-06 Thread David Reagan
I'm starting to run playbooks automatically via a push server. Basically 
emulating what you can get with Puppet. As part of that, I'd like to send 
the output of my cronjob playbooks into my ELK stack. Which is hard to do 
when the default output is so unreadable.

Here's effectively what I want to get: http://pastebin.com/eVVcLfKn

Basically, a log entry per task per host.

>From what I've seen googling around, the way to do this is via a callback 
plugin. So I looked 
at https://github.com/ansible/ansible/blob/devel/plugins/callbacks/log_plays.py 
and got lost. My Python skills are very low, and apparently my general dev 
skills are currently not up to the task.

I tried modifying log_plays to just dump the data variable raw, but I keep 
running into errors 

Any tips? 

Has anyone already solved this problem?

-- 
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 ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/d5e3c925-1df9-43b0-ad80-dbb1cb5f6a31%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Unable to set up NFS on EC2 instances launched using Ansible

2015-07-06 Thread Luke Valenta
Hi,

I am unable to get NFS configured correctly on EC2 instances launched via 
the 'ec2' module in Ansible. When I launch instances using the exact same 
AMI from the AWS EC2 console, NFS works without a hitch.

First I'll describe my setup, and then how to reproduce the problem. I'm 
running Ansible from a Mac OSX Yosemite version 10.10.3.

$ ansible --version
ansible 1.9.2

I was also able to reproduce the problem from a machine running Debian 8.1 
with Ansible version 1.9.

This is the ansible playbook I'm using to launch 2 ec2 instances.

$ cat test-nfs.yml
- hosts: localhost
  tasks:
   - ec2:
  key_name: my_key
  aws_region: us-east-1
  zone: us-east-1c
  image: ami-d05e75b8
  vpc_subnet_id: subnet-cba9efbc
  instance_type: t2.micro
  exact_count: 2
  count_tag:
Name: nfs-test
  instance_tags:
Name: nfs-test
  assign_public_ip: yes
  wait: yes

Launch two instances.

$ ansible-playbook -i ./ec2.py test-nfs.yml

Then, SSH into the first instance and set up NFS.

$ ssh ubuntu@
$ sudo mkdir -m 777 /test
$ sudo apt-get install nfs-kernel-server
$ sudo cat "/test*(rw,async,no_subtree_check)" >> 
/etc/exports
$ sudo service nfs-kernel-server restart

Attempt to mount NFS on the second instance.

$ sudo mkdir -m 777 /test
$ sudo apt-get install nfs-common
$ sudo mount :/test /test

The last step (mounting /test) hangs and times out if the instances were 
launched using the ansible ec2 module, but completes almost instantly when 
the instance are launched from the AWS EC2 console or using the AWS CLI.

$ aws ec2 run-instances --image-id ami-d05e75b8 --count 1 
--instance-type t2.micro --key-name test --security-group-ids sg-8fd0f7eb 
--subnet-id subnet-cba9efbc

Any help would be greatly appreciated. I can provide additional information 
about the setup if requested.

-- 
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 ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/545872d9-4afd-4840-b0d4-b19a284ecdf0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] regex with lineinfile module giving error

2015-07-06 Thread Jim McMahon
Ugh!.  Thanks


On Monday, July 6, 2015 at 4:53:59 PM UTC-4, Brian Coca wrote:
>
> regexp not regex is the parameter. 
>
> On Mon, Jul 6, 2015 at 4:34 PM, Jim McMahon 
> > wrote: 
> > I have version 1.8.2 of ansible, but it's giving me this error when I 
> try to 
> > use regex with lineinfile: 
> > 
> > msg: unsupported parameter for module: regex 
> > 
> > 
> > Here's what I'm trying to run: 
> > 
> > 
> > - name: Set ASSET_VERSION to commit hash 
> >   sudo: true 
> >   sudo_user: "{{ app_name }}" 
> >   lineinfile: 
> > dest: "{{ env_path }}/{{ app_name }}-env.{{ stage }}" 
> > line: "ASSET_VERSION={{ commit_hash.stdout }}" 
> > regex: "^ASSET_VERSION=" 
> > state: present 
> >   tags: 
> > - design 
> > 
> > 
> > It will run without the regex, but not with the regex. Was regex taken 
> out 
> > of lineinfile? 
> > 
> > -- 
> > 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-proje...@googlegroups.com . 
> > To post to this group, send email to ansible...@googlegroups.com 
> . 
> > To view this discussion on the web visit 
> > 
> https://groups.google.com/d/msgid/ansible-project/8bac9747-cae3-4ee6-9f06-bcc848c6d151%40googlegroups.com.
>  
>
> > For more options, visit https://groups.google.com/d/optout. 
>
>
>
> -- 
> Brian Coca 
>

-- 
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 ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/53be511f-25b6-433f-9f22-0e4c1d9f2e55%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: How to get item by item from the item.stdout so you can execute a command for each item on the item.stdout.

2015-07-06 Thread Tom Paine
https://docs.ansible.com/playbooks_loops.html#iterating-over-the-results-of-a-program-execution

-- 
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 ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/089ec724-a6e9-40c5-ad0e-fd79a491bae5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] regex with lineinfile module giving error

2015-07-06 Thread Brian Coca
regexp not regex is the parameter.

On Mon, Jul 6, 2015 at 4:34 PM, Jim McMahon
 wrote:
> I have version 1.8.2 of ansible, but it's giving me this error when I try to
> use regex with lineinfile:
>
> msg: unsupported parameter for module: regex
>
>
> Here's what I'm trying to run:
>
>
> - name: Set ASSET_VERSION to commit hash
>   sudo: true
>   sudo_user: "{{ app_name }}"
>   lineinfile:
> dest: "{{ env_path }}/{{ app_name }}-env.{{ stage }}"
> line: "ASSET_VERSION={{ commit_hash.stdout }}"
> regex: "^ASSET_VERSION="
> state: present
>   tags:
> - design
>
>
> It will run without the regex, but not with the regex. Was regex taken out
> of lineinfile?
>
> --
> 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 ansible-project@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/8bac9747-cae3-4ee6-9f06-bcc848c6d151%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



-- 
Brian Coca

-- 
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 ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAJ5XC8%3D23QbyxOtotbMAHd3zJ7uK_O_cTxYhv-8w-2Y0JZOfhA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] OSX 10.10.3 check uri httplib2 not found

2015-07-06 Thread Anatol
ok thanks, I´m new to python + ansible and would not have asked if google 
had brought up something useful.

-- 
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 ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/f7470305-f055-4d4b-9fa0-112994ba20d2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] regex with lineinfile module giving error

2015-07-06 Thread Jim McMahon
I have version 1.8.2 of ansible, but it's giving me this error when I try 
to use regex with lineinfile:

*msg: unsupported parameter for module: regex*


Here's what I'm trying to run:


- name: Set ASSET_VERSION to commit hash
  sudo: true
  sudo_user: "{{ app_name }}"
  lineinfile: 
dest: "{{ env_path }}/{{ app_name }}-env.{{ stage }}"
line: "ASSET_VERSION={{ commit_hash.stdout }}"
regex: "^ASSET_VERSION="
state: present
  tags:
- design


It will run without the regex, but not with the regex. Was regex taken out of 
lineinfile?

-- 
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 ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/8bac9747-cae3-4ee6-9f06-bcc848c6d151%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Running from Source - callbacks error

2015-07-06 Thread Brian Coca
we have not finished porting allt he callbacks, the API has changed a
bit, but the default ones used by ansible and ansible-playbook should
be there

On Mon, Jul 6, 2015 at 4:25 PM, Ethan Merrill  wrote:
> I see plugins/callback (notice it's singular) and the contents don't appear
> to be the same as the callbacks py/pyc files from earlier.
>
> Ethan
>
> On Monday, July 6, 2015 at 4:16:22 PM UTC-4, Brian Coca wrote:
>>
>> they should be under plugins/callbacks
>>
>> On Mon, Jul 6, 2015 at 3:39 PM, Ethan Merrill  wrote:
>> > Hi...
>> >
>> > I just setup a new ubuntu system to run from source using the "sudo make
>> > install" command.  When I try to run scripts that use "from ansible
>> > import
>> > callbacks" Python gives an error that callbacks doesn't exist.  If I
>> > just
>> > try running the following from the command line I get the same:
>> >
>> > vagrant@precise64:~/ansible$ python
>> > Python 2.7.3 (default, Jun 22 2015, 19:33:41)
>> > [GCC 4.6.3] on linux2
>> > Type "help", "copyright", "credits" or "license" for more information.
>>  from ansible import callbacks
>> > Traceback (most recent call last):
>> >   File "", line 1, in 
>> > ImportError: cannot import name callbacks
>> 
>> >
>> > However importing other things like ansible utils does work.
>> >
>> > I notice that there are no longer any callback py or pyc files in
>> > /usr/local/lib/python2.7/dist-packages/ansible-2.0.0-py2.7.egg/ansible/:
>> >
>> >
>> > vagrant@precise64:/usr/local/lib/python2.7/dist-packages/ansible-2.0.0-py2.7.egg/ansible$
>> > ll
>> > total 112
>> > drwxr-sr-x 18 root staff  4096 Jul  6 19:32 ./
>> > drwxr-sr-x  4 root staff  4096 Jul  6 19:32 ../
>> > drwxr-sr-x  2 root staff  4096 Jul  6 19:32 cli/
>> > drwxr-sr-x  3 root staff  4096 Jul  6 19:32 compat/
>> > drwxr-sr-x  2 root staff  4096 Jul  6 19:32 config/
>> > -rwxr-xr-x  1 root staff 15580 Jul  6 19:32 constants.py*
>> > -rw-r--r--  1 root staff 13616 Jul  6 19:32 constants.pyc
>> > drwxr-sr-x  2 root staff  4096 Jul  6 19:32 errors/
>> > drwxr-sr-x  3 root staff  4096 Jul  6 19:32 executor/
>> > drwxr-sr-x  3 root staff  4096 Jul  6 19:32 galaxy/
>> > -rwxr-xr-x  1 root staff   765 Jul  6 19:32 __init__.py*
>> > -rw-r--r--  1 root staff   242 Jul  6 19:32 __init__.pyc
>> > drwxr-sr-x  3 root staff  4096 Jul  6 19:32 inventory/
>> > drwxr-sr-x  4 root staff  4096 Jul  6 19:32 modules/
>> > drwxr-sr-x  2 root staff  4096 Jul  6 19:32 module_utils/
>> > drwxr-sr-x  2 root staff  4096 Jul  6 19:32 new_inventory/
>> > drwxr-sr-x  5 root staff  4096 Jul  6 19:32 parsing/
>> > drwxr-sr-x  3 root staff  4096 Jul  6 19:32 playbook/
>> > drwxr-sr-x 12 root staff  4096 Jul  6 19:32 plugins/
>> > drwxr-sr-x  2 root staff  4096 Jul  6 19:32 template/
>> > drwxr-sr-x  3 root staff  4096 Jul  6 19:32 utils/
>> > drwxr-sr-x  2 root staff  4096 Jul  6 19:32 vars/
>> >
>> > vagrant@precise64:/usr/local/lib/python2.7/dist-packages/ansible-2.0.0-py2.7.egg/ansible$
>> >
>> > Are callbacks being referenced differently now?
>> >
>> > Ethan
>> >
>> > --
>> > 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-proje...@googlegroups.com.
>> > To post to this group, send email to ansible...@googlegroups.com.
>> > To view this discussion on the web visit
>> >
>> > https://groups.google.com/d/msgid/ansible-project/daf6990b-e940-4096-ad97-9256a1a7d509%40googlegroups.com.
>> > For more options, visit https://groups.google.com/d/optout.
>>
>>
>>
>> --
>> Brian Coca
>
> --
> 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 ansible-project@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/e4229b86-0dc0-47f3-aaf0-17677bfb17a7%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.



-- 
Brian Coca

-- 
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 ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAJ5XC8nCmmJ3bETJSXw-dKS%2BSw48enp9pu-tWX4axB1iX_EA4Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Running from Source - callbacks error

2015-07-06 Thread Ethan Merrill
I see plugins/callback (notice it's singular) and the contents don't appear 
to be the same as the callbacks py/pyc files from earlier.

Ethan

On Monday, July 6, 2015 at 4:16:22 PM UTC-4, Brian Coca wrote:
>
> they should be under plugins/callbacks 
>
> On Mon, Jul 6, 2015 at 3:39 PM, Ethan Merrill  > wrote: 
> > Hi... 
> > 
> > I just setup a new ubuntu system to run from source using the "sudo make 
> > install" command.  When I try to run scripts that use "from ansible 
> import 
> > callbacks" Python gives an error that callbacks doesn't exist.  If I 
> just 
> > try running the following from the command line I get the same: 
> > 
> > vagrant@precise64:~/ansible$ python 
> > Python 2.7.3 (default, Jun 22 2015, 19:33:41) 
> > [GCC 4.6.3] on linux2 
> > Type "help", "copyright", "credits" or "license" for more information. 
>  from ansible import callbacks 
> > Traceback (most recent call last): 
> >   File "", line 1, in  
> > ImportError: cannot import name callbacks 
>  
> > 
> > However importing other things like ansible utils does work. 
> > 
> > I notice that there are no longer any callback py or pyc files in 
> > /usr/local/lib/python2.7/dist-packages/ansible-2.0.0-py2.7.egg/ansible/: 
> > 
> > 
> vagrant@precise64:/usr/local/lib/python2.7/dist-packages/ansible-2.0.0-py2.7.egg/ansible$
>  
>
> > ll 
> > total 112 
> > drwxr-sr-x 18 root staff  4096 Jul  6 19:32 ./ 
> > drwxr-sr-x  4 root staff  4096 Jul  6 19:32 ../ 
> > drwxr-sr-x  2 root staff  4096 Jul  6 19:32 cli/ 
> > drwxr-sr-x  3 root staff  4096 Jul  6 19:32 compat/ 
> > drwxr-sr-x  2 root staff  4096 Jul  6 19:32 config/ 
> > -rwxr-xr-x  1 root staff 15580 Jul  6 19:32 constants.py* 
> > -rw-r--r--  1 root staff 13616 Jul  6 19:32 constants.pyc 
> > drwxr-sr-x  2 root staff  4096 Jul  6 19:32 errors/ 
> > drwxr-sr-x  3 root staff  4096 Jul  6 19:32 executor/ 
> > drwxr-sr-x  3 root staff  4096 Jul  6 19:32 galaxy/ 
> > -rwxr-xr-x  1 root staff   765 Jul  6 19:32 __init__.py* 
> > -rw-r--r--  1 root staff   242 Jul  6 19:32 __init__.pyc 
> > drwxr-sr-x  3 root staff  4096 Jul  6 19:32 inventory/ 
> > drwxr-sr-x  4 root staff  4096 Jul  6 19:32 modules/ 
> > drwxr-sr-x  2 root staff  4096 Jul  6 19:32 module_utils/ 
> > drwxr-sr-x  2 root staff  4096 Jul  6 19:32 new_inventory/ 
> > drwxr-sr-x  5 root staff  4096 Jul  6 19:32 parsing/ 
> > drwxr-sr-x  3 root staff  4096 Jul  6 19:32 playbook/ 
> > drwxr-sr-x 12 root staff  4096 Jul  6 19:32 plugins/ 
> > drwxr-sr-x  2 root staff  4096 Jul  6 19:32 template/ 
> > drwxr-sr-x  3 root staff  4096 Jul  6 19:32 utils/ 
> > drwxr-sr-x  2 root staff  4096 Jul  6 19:32 vars/ 
> > 
> vagrant@precise64:/usr/local/lib/python2.7/dist-packages/ansible-2.0.0-py2.7.egg/ansible$
>  
>
> > 
> > Are callbacks being referenced differently now? 
> > 
> > Ethan 
> > 
> > -- 
> > 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-proje...@googlegroups.com . 
> > To post to this group, send email to ansible...@googlegroups.com 
> . 
> > To view this discussion on the web visit 
> > 
> https://groups.google.com/d/msgid/ansible-project/daf6990b-e940-4096-ad97-9256a1a7d509%40googlegroups.com.
>  
>
> > For more options, visit https://groups.google.com/d/optout. 
>
>
>
> -- 
> Brian Coca 
>

-- 
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 ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/e4229b86-0dc0-47f3-aaf0-17677bfb17a7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Running from Source - callbacks error

2015-07-06 Thread Brian Coca
they should be under plugins/callbacks

On Mon, Jul 6, 2015 at 3:39 PM, Ethan Merrill  wrote:
> Hi...
>
> I just setup a new ubuntu system to run from source using the "sudo make
> install" command.  When I try to run scripts that use "from ansible import
> callbacks" Python gives an error that callbacks doesn't exist.  If I just
> try running the following from the command line I get the same:
>
> vagrant@precise64:~/ansible$ python
> Python 2.7.3 (default, Jun 22 2015, 19:33:41)
> [GCC 4.6.3] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
 from ansible import callbacks
> Traceback (most recent call last):
>   File "", line 1, in 
> ImportError: cannot import name callbacks

>
> However importing other things like ansible utils does work.
>
> I notice that there are no longer any callback py or pyc files in
> /usr/local/lib/python2.7/dist-packages/ansible-2.0.0-py2.7.egg/ansible/:
>
> vagrant@precise64:/usr/local/lib/python2.7/dist-packages/ansible-2.0.0-py2.7.egg/ansible$
> ll
> total 112
> drwxr-sr-x 18 root staff  4096 Jul  6 19:32 ./
> drwxr-sr-x  4 root staff  4096 Jul  6 19:32 ../
> drwxr-sr-x  2 root staff  4096 Jul  6 19:32 cli/
> drwxr-sr-x  3 root staff  4096 Jul  6 19:32 compat/
> drwxr-sr-x  2 root staff  4096 Jul  6 19:32 config/
> -rwxr-xr-x  1 root staff 15580 Jul  6 19:32 constants.py*
> -rw-r--r--  1 root staff 13616 Jul  6 19:32 constants.pyc
> drwxr-sr-x  2 root staff  4096 Jul  6 19:32 errors/
> drwxr-sr-x  3 root staff  4096 Jul  6 19:32 executor/
> drwxr-sr-x  3 root staff  4096 Jul  6 19:32 galaxy/
> -rwxr-xr-x  1 root staff   765 Jul  6 19:32 __init__.py*
> -rw-r--r--  1 root staff   242 Jul  6 19:32 __init__.pyc
> drwxr-sr-x  3 root staff  4096 Jul  6 19:32 inventory/
> drwxr-sr-x  4 root staff  4096 Jul  6 19:32 modules/
> drwxr-sr-x  2 root staff  4096 Jul  6 19:32 module_utils/
> drwxr-sr-x  2 root staff  4096 Jul  6 19:32 new_inventory/
> drwxr-sr-x  5 root staff  4096 Jul  6 19:32 parsing/
> drwxr-sr-x  3 root staff  4096 Jul  6 19:32 playbook/
> drwxr-sr-x 12 root staff  4096 Jul  6 19:32 plugins/
> drwxr-sr-x  2 root staff  4096 Jul  6 19:32 template/
> drwxr-sr-x  3 root staff  4096 Jul  6 19:32 utils/
> drwxr-sr-x  2 root staff  4096 Jul  6 19:32 vars/
> vagrant@precise64:/usr/local/lib/python2.7/dist-packages/ansible-2.0.0-py2.7.egg/ansible$
>
> Are callbacks being referenced differently now?
>
> Ethan
>
> --
> 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 ansible-project@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/daf6990b-e940-4096-ad97-9256a1a7d509%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



-- 
Brian Coca

-- 
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 ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAJ5XC8n0_E9Z5XNMf3jH5dY8gwyMVJO4coqtUbaMP%2BWF%2BLUJEg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Ansible-playbook ejecution error

2015-07-06 Thread Alejandro Ferrari
Hi Guys, 

Any know why I get this error?

ansible-playbook -vv /etc/ansible/roles/env-stb/channels1.yml
Traceback (most recent call last):
  File "/usr/bin/ansible-playbook", line 324, in 
sys.exit(main(sys.argv[1:]))
  File "/usr/bin/ansible-playbook", line 264, in main
pb.run()
  File "/usr/lib/pymodules/python2.7/ansible/playbook/__init__.py", line 
310, in run
play = Play(self, play_ds, play_basedir, 
vault_password=self.vault_password)
  File "/usr/lib/pymodules/python2.7/ansible/playbook/play.py", line 103, 
in __init__
ds = self._load_roles(self.roles, ds)
  File "/usr/lib/pymodules/python2.7/ansible/playbook/play.py", line 440, 
in _load_roles
roles = self._build_role_dependencies(roles, [], {})
  File "/usr/lib/pymodules/python2.7/ansible/playbook/play.py", line 274, 
in _build_role_dependencies
defaults_data = utils.parse_yaml_from_file(defaults, 
vault_password=self.vault_password)
  File "/usr/lib/pymodules/python2.7/ansible/utils/__init__.py", line 780, 
in parse_yaml_from_file
process_yaml_error(exc, data, path, show_content)
  File "/usr/lib/pymodules/python2.7/ansible/utils/__init__.py", line 706, 
in process_yaml_error
probline = data.split("\n")[mark.line]
IndexError: list index out of range

Run in ansible 1.9.2

My playbook is really simple:

---

# Default roles for all the servers.
- hosts: stb-channels1
  roles:
- jdk7
- tomcat7
- tomcat7-desktop-webserver
- tomcat7-mobile-banking-server
- tomcat7-mobile-banking-portal
- tomcat7-tas-banking-server
- tomcat7-tas-banking-portal

Some advice?

-- 
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 ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/b47efc4f-9bb3-4e39-8166-e86381df50f5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Running from Source - callbacks error

2015-07-06 Thread Ethan Merrill
Hi...

I just setup a new ubuntu system to run from source using the "sudo make 
install" command.  When I try to run scripts that use "from ansible import 
callbacks" Python gives an error that callbacks doesn't exist.  If I just 
try running the following from the command line I get the same:

vagrant@precise64:~/ansible$ python
Python 2.7.3 (default, Jun 22 2015, 19:33:41) 
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from ansible import callbacks
Traceback (most recent call last):
  File "", line 1, in 
ImportError: cannot import name callbacks
>>> 

However importing other things like ansible utils does work.

I notice that there are no longer any callback py or pyc files 
in /usr/local/lib/python2.7/dist-packages/ansible-2.0.0-py2.7.egg/ansible/:

vagrant@precise64:/usr/local/lib/python2.7/dist-packages/ansible-2.0.0-py2.7.egg/ansible$
 
ll
total 112
drwxr-sr-x 18 root staff  4096 Jul  6 19:32 ./
drwxr-sr-x  4 root staff  4096 Jul  6 19:32 ../
drwxr-sr-x  2 root staff  4096 Jul  6 19:32 cli/
drwxr-sr-x  3 root staff  4096 Jul  6 19:32 compat/
drwxr-sr-x  2 root staff  4096 Jul  6 19:32 config/
-rwxr-xr-x  1 root staff 15580 Jul  6 19:32 constants.py*
-rw-r--r--  1 root staff 13616 Jul  6 19:32 constants.pyc
drwxr-sr-x  2 root staff  4096 Jul  6 19:32 errors/
drwxr-sr-x  3 root staff  4096 Jul  6 19:32 executor/
drwxr-sr-x  3 root staff  4096 Jul  6 19:32 galaxy/
-rwxr-xr-x  1 root staff   765 Jul  6 19:32 __init__.py*
-rw-r--r--  1 root staff   242 Jul  6 19:32 __init__.pyc
drwxr-sr-x  3 root staff  4096 Jul  6 19:32 inventory/
drwxr-sr-x  4 root staff  4096 Jul  6 19:32 modules/
drwxr-sr-x  2 root staff  4096 Jul  6 19:32 module_utils/
drwxr-sr-x  2 root staff  4096 Jul  6 19:32 new_inventory/
drwxr-sr-x  5 root staff  4096 Jul  6 19:32 parsing/
drwxr-sr-x  3 root staff  4096 Jul  6 19:32 playbook/
drwxr-sr-x 12 root staff  4096 Jul  6 19:32 plugins/
drwxr-sr-x  2 root staff  4096 Jul  6 19:32 template/
drwxr-sr-x  3 root staff  4096 Jul  6 19:32 utils/
drwxr-sr-x  2 root staff  4096 Jul  6 19:32 vars/
vagrant@precise64:/usr/local/lib/python2.7/dist-packages/ansible-2.0.0-py2.7.egg/ansible$
 

Are callbacks being referenced differently now?

Ethan

-- 
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 ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/daf6990b-e940-4096-ad97-9256a1a7d509%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] service module does not allow to change the rc.d priority level

2015-07-06 Thread Florian Dambrine
Hey folks,

I have a quite common use case where I want to manage rc levels for a 
specific init.d script (In that case tomcat). I did not find a way to 
change the priority of the init script with the service module.

Right now if I do:

- name: Enable Tomcat to start at boot time
  service: name=tomcat enabled=yes

The only thing that the module does is creating the following links:

   -/etc/rc0.d/K20tomcat
   -/etc/rc1.d/K20tomcat
   -/etc/rc2.d/S20tomcat
   -/etc/rc3.d/S20tomcat
   -/etc/rc4.d/S20tomcat
   -/etc/rc5.d/S20tomcat
   -/etc/rc6.d/K20tomcat
   

What I would like to do is the following:

- name: Enable Tomcat to start at boot time (top level application)
  shell: >
update-rc.d tomcat defaults 98 02

   -/etc/rc0.d/K02tomcat
   -/etc/rc1.d/K02tomcat
   -/etc/rc2.d/S98tomcat
   -/etc/rc3.d/S98tomcat
   -/etc/rc4.d/S98tomcat
   -/etc/rc5.d/S98tomcat
   -/etc/rc6.d/K02tomcat

Am I missing something with the service module? Is there an other module I 
can use in order to achieve that operation?

Thanks

-- 
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 ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/d0bacf92-3e99-4bb2-8729-866a49924498%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: How to use roles from the command line?

2015-07-06 Thread Marc Abramowitz
On Monday, July 6, 2015 at 11:52:24 AM UTC-7, Marc Abramowitz wrote:
>
> OK, well I ended building a little thing. I haven't played with it much. 
> Feedback welcome.
>

It would help I would guess if I gave the URL:

https://github.com/msabramo/ansible_role_apply 

-- 
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 ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/665ac41a-2b34-4839-8437-deb2bb0fb126%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: How to use roles from the command line?

2015-07-06 Thread Marc Abramowitz
OK, well I ended building a little thing. I haven't played with it much. 
Feedback welcome.

-- 
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 ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/8d686f6d-04ab-46f8-8696-29760a81fb7e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Check if Vagrant Server

2015-07-06 Thread Phill Pafford
Is there something I can check to see if the playbook is being executed on 
a vagrant server?

Example:

If vagrant run this additional role 

or

If vagrant skip this role

Thoughts on how I can do this?

-- 
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 ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/44224986-111d-4c79-9c87-56f59353adc8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] OSX 10.10.3 check uri httplib2 not found

2015-07-06 Thread Brian Coca
not really, I don't use OS X. But plenty of others using OS X should be able to.

-- 
Brian Coca

-- 
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 ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAJ5XC8%3DbJ33Dj6ZLT-u3qLge9yo0fRg14fdp%2Bcg5rqL4umZfQQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] OSX 10.10.3 check uri httplib2 not found

2015-07-06 Thread Anatol
Can you advise me how to do that in OSX?

-- 
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 ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/e3587a40-5651-4a6d-a5cc-c4d71a8c2d53%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Trying to access groups[] programmatically not working

2015-07-06 Thread Dean Mills
Sorry Brian, I should have mentioned I caught that and fixed it after 
posting the original question! :(

D

On Monday, July 6, 2015 at 11:09:39 AM UTC-3, Brian Coca wrote:
>
> well, the group is 'develop' and your string is 'development' 
>
>
>
> -- 
> Brian Coca 
>

-- 
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 ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/3b55dcca-0f5b-42df-836b-57f4ab192491%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: GCE dynamic inventory error on OSX 10 , ansible 1.62

2015-07-06 Thread Kevin Schumacher
Abdulrahim - 

I am having the same issue, still on Ansible 1.8.4. Did you ever solve the 
issue? 

On Friday, March 13, 2015 at 11:01:42 AM UTC-4, abdulrahim umar wrote:
>
> Correction ansible version is latest1.8.4 installed with macports
>
> On Friday, March 13, 2015 at 3:24:53 PM UTC+2, abdulrahim umar wrote:
>>
>> Having an issue when using the dynamic inventory gce.py script with a 
>> bastion box . ssh config  proxying all connections through the bastion: 
>> ansible.cf looks like this :
>>
>> [defaults]
>> host_key_checking=False
>> forks=11
>> ask_sudo_pass=False
>> timeout=10
>>
>>
>> [ssh_connection]
>> ssh_args = -o ControlPersist=15m -F ssh.config -q
>> scp_if_ssh = True
>> control_path = ~/.ssh/mux-%%r@%%h:%%p
>> pipelining=True
>>
>> and in the ssh.config:
>>
>> Host bastion
>> User   myuser
>> HostName   XX.XX.XX.XX
>> ProxyCommand   none
>> IdentityFile   credentials/mykey.pem
>> BatchMode  yes
>> PasswordAuthentication no
>>
>> Host *
>> ServerAliveInterval60
>> TCPKeepAlive   yes
>> UserKnownHostsFile /dev/null
>> StrictHostKeyChecking  no
>> ProxyCommand   ssh -q -A myu...@xx.xx.xx.xx -i 
>> credentials/service -o StrictHostKeyChecking=no  nc %h %p
>> ControlMaster  auto
>> ControlPath~/.ssh/mux-%r@%h:%p
>> ControlPersist 8h
>> IdentityFile   credentials/myotherkey.pem
>> User   myuser
>>
>>
>> the inventory subdir contains the gce.ini and gce.py files  which was 
>> working before , however trying to run any playbook from this morning 
>> results in the following error:
>>
>> sh-3.2# ansible-playbook prdblb.yml -i inventory/ -
>>>
>>> Traceback (most recent call last):
>>>
>>>   File "/usr/local/bin/ansible-playbook", line 326, in 
>>>
>>> sys.exit(main(sys.argv[1:]))
>>>
>>>   File "/usr/local/bin/ansible-playbook", line 162, in main
>>>
>>> inventory = ansible.inventory.Inventory(options.inventory, 
>>> vault_password=vault_pass)
>>>
>>>   File 
>>> "/Library/Python/2.7/site-packages/ansible/inventory/__init__.py", line 
>>> 100, in __init__
>>>
>>> self.parser = InventoryDirectory(filename=host_list)
>>>
>>>   File "/Library/Python/2.7/site-packages/ansible/inventory/dir.py", 
>>> line 56, in __init__
>>>
>>> parser = InventoryScript(filename=fullpath)
>>>
>>>   File "/Library/Python/2.7/site-packages/ansible/inventory/script.py", 
>>> line 49, in __init__
>>>
>>> self.groups = self._parse(stderr)
>>>
>>>   File "/Library/Python/2.7/site-packages/ansible/inventory/script.py", 
>>> line 57, in _parse
>>>
>>> self.raw  = utils.parse_json(self.data)
>>>
>>>   File "/Library/Python/2.7/site-packages/ansible/utils/__init__.py", 
>>> line 552, in parse_json
>>>
>>> results = json.loads(data)
>>>
>>>   File "/Library/Python/2.7/site-packages/simplejson/__init__.py", line 
>>> 505, in loads
>>>
>>> return _default_decoder.decode(s)
>>>
>>>   File "/Library/Python/2.7/site-packages/simplejson/decoder.py", line 
>>> 370, in decode
>>>
>>> obj, end = self.raw_decode(s)
>>>
>>>   File "/Library/Python/2.7/site-packages/simplejson/decoder.py", line 
>>> 400, in raw_decode
>>>
>>> return self.scan_once(s, idx=_w(s, idx).end())
>>>
>>> simplejson.scanner.JSONDecodeError: Expecting value: line 1 column 1 
>>> (char 0)
>>>
>>
>>

-- 
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 ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/69e30c1b-7201-40a6-94ff-ffa377bd8bce%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Trying to access groups[] programmatically not working

2015-07-06 Thread Brian Coca
well, the group is 'develop' and your string is 'development'



-- 
Brian Coca

-- 
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 ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAJ5XC8mTDYPzZuk6qquJ_wqCV%3D8EU50ZmSTiDbXHV_cajsUDXA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] URI Module fails POST but CURL succeds as shell

2015-07-06 Thread Romeo Theriault
What does it show you when you run it in verbose mode?

On Sun, Jul 5, 2015 at 11:53 PM,  wrote:

> I am getting a connection refused socket error :111 when using get_uri
> module for POST of a zip file to a url . If i use curl command on shell the
> task runs without error. How can i fix this issue?
>
>  --
> 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 ansible-project@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/88f8e809-9ce6-4e7a-ad43-39fc3f78abbf%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Romeo

-- 
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 ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CACUx58PqpEGGyM7E%2Bnk5aYim3tABQkqzsqOeFd%3DBxE7y_Wfi9A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Problem with ansible.cfg file provided by repository

2015-07-06 Thread Federico Aguirre
Thanks Brian.!!

Yep.! It was a path problem. It's solved.!

Thanks again.!
Fede

El lunes, 6 de julio de 2015, 10:48:52 (UTC-3), Brian Coca escribió:
>
> ansible.cfg is read from current working directory, ~/.ansible.cfg or 
> /etc/ansible/ansible.cfg, so you have to be in the same directory when 
> executing the play to pick it up. 
>
>
> -- 
> Brian Coca 
>

-- 
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 ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/cc0f1fb5-2a17-4f17-b14c-9c31a2dbfe27%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Trying to access groups[] programmatically not working

2015-07-06 Thread Dean Mills
Thanks Brian, although that didn't change the error any :(

D

On Saturday, July 4, 2015 at 12:07:52 AM UTC-3, Brian Coca wrote:
>
> try 
>
> haproxy_group: "{{groups[machine_environment + '.' + vpc_region + '.' 
> +  proxy_servers]}}" 
>
> -- 
> Brian Coca 
>

-- 
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 ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/9992d49c-4bf3-409c-bdf4-b916f4479bc5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Problem with ansible.cfg file provided by repository

2015-07-06 Thread Brian Coca
ansible.cfg is read from current working directory, ~/.ansible.cfg or
/etc/ansible/ansible.cfg, so you have to be in the same directory when
executing the play to pick it up.


-- 
Brian Coca

-- 
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 ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAJ5XC8nVTM3sH3ye1v9YV_Xx7MAVW17fHxxW98NL1Jd_W%2BkXkw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] URI Module fails POST but CURL succeds as shell

2015-07-06 Thread sveera
I am getting a connection refused socket error :111 when using get_uri 
module for POST of a zip file to a url . If i use curl command on shell the 
task runs without error. How can i fix this issue?

-- 
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 ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/88f8e809-9ce6-4e7a-ad43-39fc3f78abbf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Using Ansible to provision Jenkins

2015-07-06 Thread Maekawa, Naomi
hi anthony,

you can check delegation and local_action to download the jenkins cli to
your local workstation:
https://docs.ansible.com/playbooks_delegation.html

best,
naomi.
---

On Mon, Jul 6, 2015 at 5:31 AM, Anthony Green <
anthony.charles.gr...@gmail.com> wrote:

> I'm using Ansible to provision a machine with Jenkins within a Docker
> container
>
> As part of the provisioning process I wait until Jenkins is running and
> then download the CLI to continue the provisioning  by executing CLI
> commands.
> The jar file is being downloaded to the host machine.
>
> I was wondering if this was necessarily the best approach ?
> Could the CLI jar be downloaded to my workstation instead and the commands
> executed from there?
> Could I use Groovy scripts to provision the machine ?
> Other suggestions?
>
>  --
> 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 ansible-project@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/39af6126-0ba0-4c22-8573-5815f456208e%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAAO6sMz%2BrqUEVkucSyC1AGE2xBok_W0SARfCnJnejw6yuztzgw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] How to get item by item from the item.stdout so you can execute a command for each item on the item.stdout.

2015-07-06 Thread Esteban Freire
Hi all,

I have the two following actions:

- name: Getting the IDs for the VMs running under the user
  sudo: True
  sudo_user: oneadmin
  shell: onevm list | grep {{ item.value.login_name }} |  awk 'BEGIN {FS=" 
"}{print $1}'
  with_dict: disable_users_account
  register: VMIDs_per_user
  ignore_errors: yes
  tags:
- delete_VMs

- name: Delete the VMs running under the user
  sudo: True
  sudo_user: oneadmin
  command: onevm delete {{ item.stdout }}
  with_items: VMIDs_per_user.results
  tags:
- delete_VMs

This is an output example from the the first action:


674
675


The problem is that the second action is not working due to the command 
expects to received just one argument per time, I mean, I need to execute:

onevm delete 674

onevm delete 675

And right now it is not working because it is executing: onevm delete 674 
675 , which it does not work because the command does not admit to pass 
more than one argument.

Therefore, my question is, do you know how to get item by item from the 
item.stdout so you can execute a command for each item on the item.stdout.

Thanks in advance,
Esteban



-- 
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 ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/5cacd39c-52a9-49ed-8be5-9185887947fb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Problem with ansible.cfg file provided by repository

2015-07-06 Thread Federico Aguirre
Hi folks,

I'm having a problem with ansible.cfg file which is built inside a repo and 
a playbook run by Jenkins. 
Basically the problem is that Ansible not read configurations from the 
ansible.cfg file provided by the repo.

So, the playbook fail with: ERROR: Unable to find an inventory file, 
specify one with -i ?

This is mi config file:

#
[defaults]
inventory = ./inventory  <= Folder in which I have: hosts / 
ec2.ini and ec2.py files
host_key_checking = False
private_key_file = /home/jenkins/.ssh/private.pem  <= Pem 
key to connect to servers

[ssh_connection]
ssh_args = -o ControlMaster=auto -o ControlPersist=60s -o 
UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no
#

Thanks,
Federico

-- 
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 ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/3ac89e19-714c-44b5-ada9-ae9346b37a5f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] OSX 10.10.3 check uri httplib2 not found

2015-07-06 Thread Brian Coca
set ansible_python_interpreter to point to the correct python for that host

On Mon, Jul 6, 2015 at 7:54 AM, Anatol  wrote:
> Hi,
>
> I´m trying to test an URL status Code:
>
> # Check that you can connect (GET) to a page and it returns a status 200
> - uri: url=http://www.example.com
>
>
> # Check that a page returns a status 200
> - action: uri url=http://www.example.com return_content=yes
>   register: webpage
>   delegate_to: 127.0.0.1
>
> - action: fail
>   when: "'illustrative' not in webpage.content"
>
>
> I´ve installed httplib2 with
>
>
> sudo pip install httplib2
>
>
> but it fails with :
>
> failed: [staging] => {"failed": true}
> msg: httplib2 is not installed
> FATAL: all hosts have already failed -- aborting
>
>
> I quess ansible is not using the right python path. How can I solve this?
>
>
>
> cheers,
>
>
> – anatol
>
>
>
> --
> 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 ansible-project@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/f835ef99-65d7-4772-9a28-1c0cec7af38b%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



-- 
Brian Coca

-- 
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 ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAJ5XC8k4HegqSsGmjvC_7LfsNpHLE_KFud88FB3JrKJYrZXWXg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] OSX 10.10.3 check uri httplib2 not found

2015-07-06 Thread Anatol
Hi,

I´m trying to test an URL status Code:

# Check that you can connect (GET) to a page and it returns a status 200
- uri: url=http://www.example.com


# Check that a page returns a status 200 
- action: uri url=http://www.example.com return_content=yes
  register: webpage
  delegate_to: 127.0.0.1

- action: fail
  when: "'illustrative' not in webpage.content"


I´ve installed httplib2 with


sudo pip install httplib2


but it fails with :

failed: [staging] => {"failed": true}
msg: httplib2 is not installed 
FATAL: all hosts have already failed -- aborting


I quess ansible is not using the right python path. How can I solve this?



cheers,


– anatol



-- 
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 ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/f835ef99-65d7-4772-9a28-1c0cec7af38b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Using Ansible to provision Jenkins

2015-07-06 Thread Anthony Green
I'm using Ansible to provision a machine with Jenkins within a Docker 
container

As part of the provisioning process I wait until Jenkins is running and 
then download the CLI to continue the provisioning  by executing CLI 
commands. 
The jar file is being downloaded to the host machine.

I was wondering if this was necessarily the best approach ?
Could the CLI jar be downloaded to my workstation instead and the commands 
executed from there?
Could I use Groovy scripts to provision the machine ?
Other suggestions?

-- 
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 ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/39af6126-0ba0-4c22-8573-5815f456208e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.