Re: [ansible-project] ansible-playbook stops after include

2015-09-02 Thread Bob Tanner

On Wednesday, September 2, 2015 at 4:08:30 PM UTC-5, Michael Legleux wrote:
>
> This configuration works fine with 1.9.2 though.
>
>
- output shows what?
 

-- 
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/6f9dd83d-66f8-4a12-b893-f1910f56d9f6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Re: UnicodeEncodeError

2015-09-02 Thread Toshio Kuratomi
Not a lot to go on... I do see that the two errors are happening in
different places.  That might be bad news for you as may mean that any
fix for 1.9.3 might not be the fix needed for 1.7.2.  But let's see
what we can find:

On Wed, Sep 2, 2015 at 3:41 PM, Eugene Romero  wrote:

>
> TASK: [syslog-client | Stop the syslog-ng service before upgrading to
> upstart] ***
> 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
> 348, in run
> if not self._run_play(play):
>   File "/usr/lib/pymodules/python2.7/ansible/playbook/__init__.py", line
> 789, in _run_play
> if not self._run_task(play, task, False):
>   File "/usr/lib/pymodules/python2.7/ansible/playbook/__init__.py", line
> 497, in _run_task
> results = self._run_task_internal(task, include_failed=include_failed)
>   File "/usr/lib/pymodules/python2.7/ansible/playbook/__init__.py", line
> 439, in _run_task_internal
> results = runner.run()
>   File "/usr/lib/pymodules/python2.7/ansible/runner/__init__.py", line 1493,
> in run
> results = [ self._executor(h, None) for h in hosts ]
>   File "/usr/lib/pymodules/python2.7/ansible/runner/__init__.py", line 590,
> in _executor
> msg = str(ae)
> UnicodeEncodeError: 'ascii' codec can't encode characters in position 40-41:
> ordinal not in range(128)
>

This is an error when trying to format this exception into a string
for display.  We can probably just substitute that line like this:

- msg = str(ae)
+ from ansible.utils.unicode import to_bytes
+ msg = to_bytes(ae)

That should solve this traceback but the fact we're getting an
exception there means that something else has gone wrong... It could
be something that you're expected to be able to handle by changing
configuration in your network though, so doing this so that you can
see what the actual error is should be helpful.

If we're lucky, once you see what the underlying error is here, you
can correct something else on your network and then 1.7.2 will run for
you as well.

I'll add a patch to the stable-1.9 tree to do this as well.  Not sure
if it will make 1.9.3 or not, though.

https://github.com/ansible/ansible/commit/f80494e434d36c1845c9fb830b6bd26ebcf35a89

>> >> fatal: [**] => Traceback (most recent call last):
>> >>   File "/usr/lib/python2.7/dist-packages/ansible/runner/__init__.py",
>> >> line
>> >> 561, in _executor
>> >> exec_rc = self._executor_internal(host, new_stdin)
>> >>   File "/usr/lib/python2.7/dist-packages/ansible/runner/__init__.py",
>> >> line
>> >> 666, in _executor_internal
>> >> return self._executor_internal_inner(host, self.module_name,
>> >> self.module_args, inject, port, complex_args=complex_args)
>> >>   File "/usr/lib/python2.7/dist-packages/ansible/runner/__init__.py",
>> >> line
>> >> 756, in _executor_internal_inner
>> >> if not utils.check_conditional(cond, self.basedir, inject,
>> >> fail_on_undefined=self.error_on_undefined_vars):
>> >>   File "/usr/lib/python2.7/dist-packages/ansible/utils/__init__.py",
>> >> line
>> >> 255, in check_conditional
>> >>
>> >> UnicodeEncodeError: 'ascii' codec can't encode characters in position
>> >> 15-16: ordinal not in range(128)

1.7.2 is old and I'm not sure of some of the ramifications of making
changes in the code (in newer versions of ansible we've been moving
towards making sure that internally we handle everything as unicode
strings and only using bytes when sending things externally.  In 1.7.2
we weren't doing that so most things were likely byte strings.  jinja2
takes and returns unicode type, however, so that's likely why we have
a problem converting from what jinja2 is returning to us here.) but we
may be able to fix this with the following code change:

- original = str(conditional).replace("jinja2_compare ","")
+ tmp_conditional = to_bytes(conditional,
errors='strict').replace("jinja2_compare ","")
+ original = tmp_conditional.replace("jinja2_compare ","")

Not sure if that will just bring us another error, further down the
line, though.

-Toshio

-- 
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/CAG9juEpANgXM5x-tyj-Zyrf7e2a10cHqjBrbxDoiWpx3rC3w1Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Simple query on usage of ">" in tasks.

2015-09-02 Thread Brian Coca
it is a YAMLism, allows for multiline content, you may have also seen
| used the same way.

On Wed, Sep 2, 2015 at 6:25 PM,   wrote:
> I am going through a playbook, where the tasks have the following format:
>
>
> - name: Start and add that the metadata service to the init sequence
> (Ubuntu)
>
>   service: >
>
> name=ceph-mds
>
> state=started
>
> enabled=yes
>
> args="id={{ ansible_hostname }}"
>
>   when: ansible_distribution == "Ubuntu"
>
>
>
> I didn't get the ">" on the line "service: >". I have never used it that way
> and was curious what it does.
>
>
>
>
> regards,
>
> Behzad
>
> --
> 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/d36ebe4d-04f7-4dd6-b8aa-8f1c97806188%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%3Dx37V7LW%2BX7wLN-qTz0u-B2K95Di%3DQfQ8%3DdedOS%3DX%2BPw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Simple query on usage of ">" in tasks.

2015-09-02 Thread behzad . dastur
I am going through a playbook, where the tasks have the following format:


- name: Start and add that the metadata service to the init sequence 
(Ubuntu)

  service: >

name=ceph-mds

state=started

enabled=yes

args="id={{ ansible_hostname }}"

  when: ansible_distribution == "Ubuntu"



I didn't get the ">" on the line "service: >". I have never used it that 
way and was curious what it does.




regards,

Behzad

-- 
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/d36ebe4d-04f7-4dd6-b8aa-8f1c97806188%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Re: UnicodeEncodeError

2015-09-02 Thread Eugene Romero
Hey Toshio! Thanks for your reply.

Since these are production machines, I can only use 1.7.2 at the moment. 
However, I installed the newest ppa version (1.9.2) on a VM cluster to test.
The error stills pops up. The error happens when it tries running the first 
task from the second playbook. However, commenting that task out just makes 
the error pop up in the next task. So I believe it's already carrying it 
from the first playbook, after completing the "Check if new upstart job is 
needed" task. 

The LC and LANG settings are "en_US.UTF-8" in the remote box.

- doesn't give me much new info. Here's the compressed output when the 
error occurs:

*ok: [anakin] => {"changed": false, "gid": 0, "group": "root", "mode": 
"0644", "owner": "root", "path": "/etc/init/syslog-ng.conf", "size": 615, 
"state": "file", "uid": 0}*

*TASK: [syslog-client | debug var=upstart] 
* ESTABLISH CONNECTION FOR USER: ***
*ok: [anakin] => {*
*"var": {*
*"upstart_times": {*
*"changed": false,*
*"gid": 0,*
*"group": "root",*
*"invocation": {*
*"module_args": "src=syslog-ng-upstart.conf.j2 
dest=/etc/init/syslog-ng.conf owner=root group=root mode=0644 backup=yes",*
*"module_name": "template"*
*},*
*"mode": "0644",*
*"owner": "root",*
*"path": "/etc/init/syslog-ng.conf",*
*"size": 615,*
*"state": "file",*
*"uid": 0*
*}*
*}*
*}*

*TASK: [syslog-client | Stop the syslog-ng service before upgrading to 
upstart] 
*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 
348, in run*
*if not self._run_play(play):*
*  File "/usr/lib/pymodules/python2.7/ansible/playbook/__init__.py", line 
789, in _run_play*
*if not self._run_task(play, task, False):*
*  File "/usr/lib/pymodules/python2.7/ansible/playbook/__init__.py", line 
497, in _run_task*
*results = self._run_task_internal(task, include_failed=include_failed)*
*  File "/usr/lib/pymodules/python2.7/ansible/playbook/__init__.py", line 
439, in _run_task_internal*
*results = runner.run()*
*  File "/usr/lib/pymodules/python2.7/ansible/runner/__init__.py", line 
1493, in run*
*results = [ self._executor(h, None) for h in hosts ]*
*  File "/usr/lib/pymodules/python2.7/ansible/runner/__init__.py", line 
590, in _executor*
*msg = str(ae)*
*UnicodeEncodeError: 'ascii' codec can't encode characters in position 
40-41: ordinal not in range(128)*

--

I noticed the error happens regardless of the variable.changed being true 
or false.

Let me know what other info you might need.

Thanks a lot for your help!





On Wednesday, September 2, 2015 at 2:36:49 PM UTC-5, tkuratomi wrote:
>
> There have been sporadic UnicodeErrors that crop up from time to time. 
> I've been trying squash them as they come up.  1.7.2 is pretty old so 
> it won't have a lot of those fixes.  Are you able to test (at least 
> the failing task) on a newer version of ansible?  That would tell you 
> if the problem has been fixed already in a newer version. 
>
>  If it's still failing with the newer version, narrowing down the 
> problem would be helpful.  Is it occurring with the first task or the 
> second?  (I'm guessing the first).  What is the output from 
> ansible-playbook - ? What LC* and LANG settings do you have on the 
> remote box? 
>
> -Toshio 
>
> On Tue, Sep 1, 2015 at 1:03 PM, Eugene Romero  > wrote: 
> > Also, I tried changing "module_lang" to "en_US.UTF-8" in 
> > /etc/ansible/ansible.cfg, but it made no difference. I don't have a 
> > ansible.cfg in the playbook directory or .ansible.cfg in the home 
> directory. 
> > 
> > Ansible version is 1.7.2. 
> > 
> > Thanks! 
> > 
> > 
> > On Tuesday, September 1, 2015 at 2:58:35 PM UTC-5, Eugene Romero wrote: 
> >> 
> >> Hi all, 
> >> 
> >> Trying to run a playbook here, but getting a Unicode error. Here's what 
> >> I'm doing: 
> >> 
> >> The plays: 
> >> 
> >> main.yml: 
> >> 
> >> - name: Check if new upstart job is needed 
> >>   template: 
> >> src=syslog-ng-upstart.conf.j2 
> >> dest=/etc/init/syslog-ng.conf 
> >> owner=root 
> >> group=root 
> >> mode=0644 
> >> backup=yes 
> >>   register: upstart 
> >> 
> >> - name: Update upstart configuration 
> >>   include: upstart.yml 
> >>   when: upstart.changed 
> >> 
> >>  
> >> 
> >> 
> >> upstart.yml: 
> >> 
> >> - name: Stop the syslog-ng service before upgrading to upstart 
> >>   service: name=syslog-ng state=stopped 
> >> 
> >> - name: Move old sysV config 
> >>   command: mv /etc/init.d/syslog-ng /etc/init.d/syslog-ng.oldconf 
> >>   ignore_errors: yes 
> >> 
> >> - name: Link the upst

Re: [ansible-project] Conditional loop messes up the following task that does a with_item

2015-09-02 Thread Samnang Sen
The error is within my original msg. I was using the when to build my deploy 
list. 

-- 
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/21354759-6daf-412c-a34a-3ff0b58c8f6c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Looking for a way execute tasks in included file based on condition

2015-09-02 Thread Joseph Djomeda
Hello Brian,

Thanks for the email. So there is no way to skip the inclusion of the file
in the first place?

Best Regards,

On Wed, Sep 2, 2015 at 8:42 PM Brian Coca  wrote:

> The when conditions will not avoid issues with a undefined or
> incorrectly typed  var in a with_ , as they get executed for each item
> inside the with_.
>
>
>
> --
> 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%3DvBEXox7J5MbAXDUwsNjHCeixskay0P7oETW2QAPu1BA%40mail.gmail.com
> .
> For more options, visit https://groups.google.com/d/optout.
>
-- 
Joseph Kodjo-Kuma Djomeda
check out my pains at : www.mycodingpains.com
We become what we think about ourselves

-- 
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/CAKDXoaLw0wgrGZ-TTcdyDB5sd9TDoVc5c4%3Du4jKXiLdEgB7hcA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Re: Ansible 2.0 os_server 404 image not found

2015-09-02 Thread Vallard
The 404 I believe comes from ansible defaulting to the v2 for glance, in which 
case no images are found and thus the 404 error.  Our openstack only has v1 
support. 
When I run glance image-list with the OS_IMAGE_API_VERSION=1 the command line 
tools show images.
This is the new behavior change in Python-glanceclient 1.0.0

Does Ansible  honor that flag?



> On Sep 2, 2015, at 12:17 PM, James Martin  wrote:
> 
> I've successfully launched servers with os_server as of today, with the 
> latest version of shade, so I don't think the module is completely broken.  I 
> do see that a 404 is being returned in your error, which is a "page not 
> found" status code (https://en.wikipedia.org/wiki/HTTP_404).  My guess is 
> that you're getting the initial token after keystone authentication, but a 
> subsequent request is failing.  Since you don't have access to the openstack 
> infrastructure to debug, I'd recommend using tcpdump and taking a look at 
> what request is causing the 404.
> 
> - James
> 
>> On Wednesday, September 2, 2015 at 12:14:08 PM UTC-5, V Benincosa wrote:
>> Hi! 
>> Checking out the 2.0 release and having some problems launching machine.  
>> When I run: 
>> 
>> ansible-playbook lab-machines.yml 
>> 
>> - name: Ensure lab machines are up
>>   connection: local
>>   hosts: localhost
>>   vars_files:
>>- vars/metacloud_vars.yml
>> 
>>   tasks: 
>>   - name: Ensure lab machines are up
>> os_server:
>>   state: present
>> #  auth: 
>> #auth_url: "{{ lookup('env', 'OS_AUTH_URL') }}"
>> #username: "{{ lookup('env', 'OS_USERNAME') }}"
>> #password: "{{ lookup('env', 'OS_PASSWORD') }}"
>> #project_name: "{{ lookup('env', 'OS_TENANT_NAME') }}"
>>   name: "{{ item }}"
>>   key_name: "{{ keypair }}"
>>   flavor: "{{ m1large }}"
>>   floating_ip_pools:
>> - "{{ floating_ip_pool }}"
>>   security_groups: "{{ security_group }}"
>>   userdata:  "{{ lookup('file', 'files/coreos-python.sh') }}"
>>   image: CoreOS723
>> with_items: 
>>   - lab01
>> I get the error:  
>> 
>> failed: [localhost] => (item=lab01) => {"extra_data": null, "failed": true, 
>> "item": "lab01", "msg": "Error fetching image list: 404 Not Found: The 
>> resource could not be found. (HTTP 404)"}
>> 
>> So you're probably thinking: I don't have that image named CoreOS723 
>> defined.  I tried nova image-list and that shows the image: 
>> 
>> $ nova image-show CoreOS723
>> +---+--+
>> | Property  | Value|
>> +---+--+
>> | OS-EXT-IMG-SIZE:size  | 493813760|
>> | created   | 2015-08-11T23:46:41Z |
>> | id| c762b1d5-5177-421f-8870-aa77b7fe03a2 |
>> | metadata architecture | x86_64   |
>> | metadata description  | CoreOS 723   |
>> | minDisk   | 6|
>> | minRam| 1000 |
>> | name  | CoreOS723|
>> | progress  | 100  |
>> | status| ACTIVE   |
>> | updated   | 2015-08-11T23:50:12Z |
>> +---+--+
>> 
>> But then I noticed that glance image-list does not: 
>> glance image-list
>> ++--+
>> | ID | Name |
>> ++--+
>> ++--+
>> 
>> This worked with the older nova commands before but seems to not work with 
>> os_compute now.  I'm doing this on Cisco's MetaCloud so I don't have 
>> operator permissions to change things.  I'm using python-glanceclient 1.0.0
>> 
>> Thanks for any pointers. 
> 
> -- 
> 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/VwXk9GMJhhY/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/6b47fe88-0512-4d7e-936a-202d4cb228e6%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/D516ECB7-B00F-4D41-93DF-B20A12956E7E%40beninc

[ansible-project] Re: os_server module

2015-09-02 Thread Antoine Voiry
I will try tomorroz

On Friday, August 28, 2015 at 10:09:40 PM UTC+1, Monty Taylor wrote:
>
> Yeah - if you're v3 passing in domain is important. When you add 
> user_domain_id and project_domain_id - what error do you get? (you have to 
> pass in both)
>
> On Friday, August 28, 2015 at 12:19:16 AM UTC-7, Antoine Voiry wrote:
>>
>> All,
>> I am facing something strange with the OS_SERVER module.
>> Also I was not able to specify the domain in auth.
>> Below is the code snipet
>> - os_server:
>>   state: present
>>   auth:
>>  auth_url: https:///v3.0/
>>  username: 
>>  password: 
>>  project_name: 
>>   name: test_instance
>>   availability_zone: AZ0
>>   image: "Ubuntu 14.04 trusty 64"
>>   key_name: workstation
>>   timeout: 200
>>   flavor: m1.medium
>>   security_groups: default
>>   validate_certs: no
>>   auto_floating_ip: yes
>>
>>
>> fatal: [localhost]: FAILED! => {"changed": false, "extra_data": null, 
>> "failed":true, "msg": "Error fetching server list: Error getting compute 
>> endpoint: The resource could not be found. (HTTP 404)"}
>>
>

-- 
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/00763166-b181-4514-8f37-6b4143b7c28a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] ansible-playbook stops after include

2015-09-02 Thread Michael Legleux
This configuration works fine with 1.9.2 though.

On Tuesday, September 1, 2015 at 5:54:09 PM UTC-7, Michael Legleux wrote:
>
> So what I posted before was a simplification to do everything separately.
> Initially, I had a role whose main.yml task includes qt.yml and wx.yml 
> (which are next to main.yml, in roles/common/tasks/)
>
> The qt.yml is:
> ---
>  - name: Adding ubuntu sdk repo
>apt_repository: 
>  repo: "ppa:ubuntu-sdk-team/ppa"
>  validate_certs: no 
>  state: present
>  
>  - name: updating apt
>apt: update_cache=true
>  
>  - name: Installing QT5
>apt: name=qt5-default
>
> and the wx.yml is:
> ---
> - name: Adding codelite repo keys
>   become:
>   apt_key: url="http://repos.codelite.org/CodeLite.asc";
>
> - name: Adding codelite repo
>   apt_repository: repo="deb http://repos.codelite.org/wx3.0/ubuntu 
> precise universe"
>
> - name: Upding apt cache
>   apt: update_cache=true
>
> - name: Install wx packages
>   apt: pkg={{ item }} state=present
>   with_items:
> -  libwxbase3.0-0-unofficial 
> -  libwxbase3.0-dev 
> -  libwxgtk3.0-0-unofficial 
> -  libwxgtk3.0-dev 
> -  wx3.0-headers
> -  wx-common
>
> Altering the order behaves the same, the second include is not actually 
> included.
>
> I just ran this playbook multiple times with every run having all includes 
> commented out in sequence and the end result is correct. Each time, the 
> include is run properly. Now how can I further debug why ansible is 
> stopping when all includes are present?
>
> On Friday, August 28, 2015 at 5:47:06 PM UTC-7, Brian Coca wrote:
>>
>> what is qt5 doing? does altering the order change the results? 
>>
>> On Fri, Aug 28, 2015 at 8:36 PM, Michael Legleux  
>> wrote: 
>> > Here is what I'm trying with ansible 2.0.0 (dev from earlier this week) 
>> > --- 
>> > - hosts: ubuntu 
>> >   gather_facts: true 
>> >   sudo: true 
>> >   tasks: 
>> >   - include: base.yml 
>> >   - include: qt5.yml 
>> >   - include: wx.yml 
>> >   - include: resources.yml 
>> > 
>> > 
>> > I run this playbook and it stops after qt5 with no errors.If I comment 
>> out 
>> > qt5, it then runs the wx.yml, then stops. 
>> > Each include run individually completes fine. 
>> > Is this not the way to achieve what I'm trying. I can't see any reason 
>> why 
>> > it doesn't finish the run. 
>> > 
>> > -- 
>> > 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/72849a45-d0a4-43eb-856c-e6fb2eab487a%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/54e686da-9c87-4289-8333-a7c798682273%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Looking for a way execute tasks in included file based on condition

2015-09-02 Thread Brian Coca
The when conditions will not avoid issues with a undefined or
incorrectly typed  var in a with_ , as they get executed for each item
inside the with_.



-- 
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%3DvBEXox7J5MbAXDUwsNjHCeixskay0P7oETW2QAPu1BA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: RDS Module "promote" function not working. Reporting "ok", but not making a change.

2015-09-02 Thread MB
Same problem here. No relevant output or error, but slave is not promoted.
We use Ansible 1.9.2 and Boto 2.37.0.
Should a Github issue be opened?

On Tuesday, June 23, 2015 at 12:07:28 PM UTC-5, Sena Heydari wrote:
>
> The role play:
>
> - name: Promote Read-Replica to New Standalone RDS Instance
>
>   rds:
>
> command: promote
>
> instance_name: new-db
>
> aws_access_key: "{{ some-key }}"
>
> aws_secret_key: "{{ some-secret }}"
>
> region: us-east-1
>
>
> Output from - (anonymized):
>
>
> <127.0.0.1> REMOTE_MODULE rds region=us-east-1 command=promote 
> aws_access_key=some-key aws_secret_key=some-secret instance_name=new-db
>
> <127.0.0.1> EXEC ['/bin/sh', '-l', '-c', 'mkdir -p 
> $HOME/.ansible/tmp/ansible-tmp-1435075726.85-46917134810376 && chmod a+rx 
> $HOME/.ansible/tmp/ansible-tmp-1435075726.85-46917134810376 && echo 
> $HOME/.ansible/tmp/ansible-tmp-1435075726.85-46917134810376']
>
> <127.0.0.1> PUT /tmp/tmpvipCL4 TO 
> /home/dir/.ansible/tmp/ansible-tmp-1435075726.85-46917134810376/rds
>
> <127.0.0.1> EXEC ['/bin/sh', '-l', '-c', u'LANG=en_US.UTF-8 
> LC_CTYPE=en_US.UTF-8 /usr/bin/python 
> /home/dir/.ansible/tmp/ansible-tmp-1435075726.85-46917134810376/rds; rm -rf 
> /home/dir/.ansible/tmp/ansible-tmp-1435075726.85-46917134810376/ >/dev/null 
> 2>&1']
>
> ok: [127.0.0.1] => {"changed": false, "instance": {"availability_zone": 
> "us-east-1d", "backup_retention": 0, "create_time": 1435073003.518, 
> "endpoint": "new-db.account-num.us-east-1.rds.amazonaws.com", "id": 
> "new-db", "instance_type": "db.m3.large", "iops": null, 
> "maintenance_window": "mon:03:00-mon:03:30", "multi_zone": false, "port": 
> 3306, "replication_source": "source-db", "status": "available", "username": 
> "someroot", "vpc_security_groups": "sg-something"}}
>
>
> Testing run with full RDS rights for user with access-key/secret. 
>
>
> Boto Version also up to date:
>
>
> Type "help", "copyright", "credits" or "license" for more information.
>
> >>> import boto
>
> >>> boto.Version
>
> '2.38.0'
>
>
> Play runs as "ok", but I confirmed the DB is still read-replica in AWS 
> console. 
>
>
> Anything obvious I'm missing, or is this a bug?
>

-- 
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/ba5e5349-574e-4b53-acd4-816d8d0c9dc9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] accelerate mode and custom python interpreter (virtualenv)

2015-09-02 Thread Toshio Kuratomi
I haven't looked at the code yet to see if there's something about
accelerate that may interfere with ansible_python_interpreter but I
have a feeling that you might not get any speedup even if you get it
working.  accelerate was written before openssh's controlpersist was
widespread.  Now that even RHEL6 has a controlpersist capable openssh,
there's not much reason to use it for most platforms.

-Toshio

On Wed, Sep 2, 2015 at 12:33 AM,   wrote:
> Hi guys,
>
> unfortunately I'm on REHL6 without the option to install python packages for
> the standard python installation. Thus I'm using Ansible from an virtualenv
> on the managing node. That works fine, except that now I'm running into
> performance issues.
>
> The virtualenv sits on a nfs share which is mounted to all nodes. Thus it is
> available on all nodes.
>
> python-keyczar is installed in the virtualenv and seems to work. At least
> the following command runs from within the virtualenv
>
> keyczart create --location=~/temp --purpose=crypt
>
> Now I've created a wrapper script for the custom python interpreter
> (/home/test/PythonVirtualEnv/pyenv
> ):
>
> #!/bin/tcsh
>
> source /home/ft2vwaa/PythonVirtualEnv/AnsibleEnv2/bin/activate.csh
>
> python $argv[1]
>
>
> and I can use it as custom interpreter, e.g.:
>
> - hosts: logstash
>   name: Source virtual env
>   remote_user: "{{ test_remote_user }}"
>   vars:
> ansible_python_interpreter: /home/test/PythonVirtualEnv/pyenv
>   tasks:
>   - name: check
> shell: echo $VIRTUAL_ENV
> register: out
>   - debug: var=out.stdout_lines
>
> This prints out the virtualenv as expected. So it is actually loaded.
>
> But adding the accelerate mode directive results in an error.
>
> - hosts: logstash
>   name: Source virtual env
>   remote_user: "{{ ipf_remote_user }}"
>   accelerate: true
>   vars:
> ansible_python_interpreter: /home/ft2vwaa/PythonVirtualEnv/pyenv
>   tasks:
>   - name: check
> shell: echo $VIRTUAL_ENV
> register: out
>   - debug: var=out.stdout_lines
>
>
> GATHERING FACTS
> ***
> fatal: [server_01] => Failed to launch the accelerated daemon on server_01
> (reason: keyczar is not installed (on the remote side))
> fatal: [server_02] => Failed to launch the accelerated daemon on server_02
> (reason: keyczar is not installed (on the remote side))
>
>
> Any ideas or suggestions are highly welcome.
>
> Cheers,
>
> Jan
>
>
>
> --
> 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/9e6dc9bf-37c2-400b-bbc0-b5e4770869aa%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/CAG9juEqyee6SWBPNOWBCMkwm8oK%3DFf%3DpN8uroMQSboN%3DOdfp4Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Conditional loop messes up the following task that does a with_item

2015-09-02 Thread Brian Coca
it would help to see the error, I'm going to guess you need a when: on
the last task that skips the 'skipped' items., also you should not
need to sudo in shell.

On Wed, Sep 2, 2015 at 3:04 PM, Samnang Sen  wrote:
> I store the modules I need to deploy within Consul. It consist of both Perl
> and PHP modules so on our web servers I only want to install the modules
> associated with PHP. The following playbook works as long as there are TWO
> matching modules. In my test case I have two keys with one of them being a
> key related to PHP deploys. The error I get is:
>
> fatal: [127.0.0.1] => with_items expects a list or a set
>
> FATAL: all hosts have already failed -- aborting
>
> If I remove the "when" clause and only have one key within Consul, it also
> works. How do I get around the error if I'm using a "when" clause and all
> that remainds within "deploy_list_result" is just one item?
>
> ## PLAYBOOK ##
>
>   - consul_kv: host=indeploy001 action=get key=deploylist/{{ jira_ticket }}
> keys=True
> register: modules_to_deploy
>
>   - name: set fact
> set_fact: deploy_list="{{ item | replace("deploylist/" + jira_ticket +
> "/",'') }}-{{ lookup('consul_kv',item) }}"
> when: "'{{ item | replace('deploylist/' + jira_ticket + '/','') }}' in
> php_modules"
> with_items: '{{ modules_to_deploy.value }}'
> register: deploy_list_result
>
>   - shell: sudo rpm -Uvh {{ rpm_repo }}/aria-{{ item }}.rpm --force --test
> with_items: "{{ deploy_list_result.results |
> map(attribute='ansible_facts.deploy_list') | sort }}"
> register: php_command_result
>
> --
> 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/7f307ebe-2c47-469c-9724-46c30c7e5a42%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/CAJ5XC8kiuDY7YyuFSTBJyQ%2BukpO9chdXn8kZL2dbALj0jJCExQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Re: Ansible 2.0 os_server 404 image not found

2015-09-02 Thread Vallard
Yes. 



> On Sep 2, 2015, at 12:03 PM, Greg DeKoenigsberg  wrote:
> 
> So this is specifically in the os_ modules, right?
> 
> --g
> 
>> On Wed, Sep 2, 2015 at 2:34 PM, V Benincosa  wrote:
>> 
>> well, that was the wrong way to go.  Shade reinstalled version
>> python-glanceclient 1.0.0 so I guess I need to figure out why glance doesn't
>> return any images. Metacloud uses icehouse.
>> 
>> --
>> 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/629025da-885b-40cf-87df-1cf0261d0d56%40googlegroups.com.
>> 
>> For more options, visit https://groups.google.com/d/optout.
> 
> 
> 
> -- 
> Greg DeKoenigsberg
> Ansible Community Guy
> 
> Find out why SD Times named Ansible
> their #1 Company to Watch in 2015:
> http://sdtimes.com/companies-watch-2015/
> 
> -- 
> 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/VwXk9GMJhhY/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/CAM1FbhHd1NCVkdfAT1s3GygXo8-ebUkDHT9jHEhkUVaORGou-g%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/BC1A9E5D-6C5C-4552-94EE-CB5D31F28EBB%40benincosa.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Re: UnicodeEncodeError

2015-09-02 Thread Toshio Kuratomi
There have been sporadic UnicodeErrors that crop up from time to time.
I've been trying squash them as they come up.  1.7.2 is pretty old so
it won't have a lot of those fixes.  Are you able to test (at least
the failing task) on a newer version of ansible?  That would tell you
if the problem has been fixed already in a newer version.

 If it's still failing with the newer version, narrowing down the
problem would be helpful.  Is it occurring with the first task or the
second?  (I'm guessing the first).  What is the output from
ansible-playbook - ? What LC* and LANG settings do you have on the
remote box?

-Toshio

On Tue, Sep 1, 2015 at 1:03 PM, Eugene Romero  wrote:
> Also, I tried changing "module_lang" to "en_US.UTF-8" in
> /etc/ansible/ansible.cfg, but it made no difference. I don't have a
> ansible.cfg in the playbook directory or .ansible.cfg in the home directory.
>
> Ansible version is 1.7.2.
>
> Thanks!
>
>
> On Tuesday, September 1, 2015 at 2:58:35 PM UTC-5, Eugene Romero wrote:
>>
>> Hi all,
>>
>> Trying to run a playbook here, but getting a Unicode error. Here's what
>> I'm doing:
>>
>> The plays:
>>
>> main.yml:
>>
>> - name: Check if new upstart job is needed
>>   template:
>> src=syslog-ng-upstart.conf.j2
>> dest=/etc/init/syslog-ng.conf
>> owner=root
>> group=root
>> mode=0644
>> backup=yes
>>   register: upstart
>>
>> - name: Update upstart configuration
>>   include: upstart.yml
>>   when: upstart.changed
>>
>> 
>>
>>
>> upstart.yml:
>>
>> - name: Stop the syslog-ng service before upgrading to upstart
>>   service: name=syslog-ng state=stopped
>>
>> - name: Move old sysV config
>>   command: mv /etc/init.d/syslog-ng /etc/init.d/syslog-ng.oldconf
>>   ignore_errors: yes
>>
>> - name: Link the upstart-job script to the syslog-ng job
>>   file:
>> src=/lib/init/upstart-job
>> path=/etc/init.d/syslog-ng
>> state=link
>>
>> - name: Reload initctl config
>>   command: sudo initctl reload-configuration
>>
>> - name: Change perms on lock folder
>>   file:
>> path=/var/lib/syslog-ng/
>> owner=syslog
>> group=syslog
>> mode=0755
>> state=directory
>>
>> - name: Restart syslog-ng service
>>   service: name=syslog-ng state=started
>>
>> --
>>
>> Not sure if important, but the template file syslog-ng-upstart.conf.j2 is:
>>
>> start on runlevel [2345]
>> stop on runlevel [!2345]
>>
>> nice 0
>>
>> respawn
>> respawn limit 3 15
>>
>> normal exit 0
>>
>> console log
>>
>> # defaults
>> env OPT_ARGS=''
>> env SYSLOG_GID='syslog'
>> env SYSLOG_UID='syslog'
>> env THREADS_NUM=5
>>
>> script
>> # load global defaults file
>> if [ -f /etc/default/syslog-ng ]; then
>> . /etc/default/syslog-ng
>> fi
>> exec /usr/sbin/syslog-ng ${OPT_ARGS} --foreground --process-mode
>> foreground --stderr --worker-threads "${THREADS_NUM}" --user "${SYSLOG_UID}"
>> --group "${SYSLOG_GID}"
>> end script
>>
>> -
>>
>>
>> When I run this job, it errors out with the following message (server
>> names edited out):
>>
>> GATHERING FACTS
>> ***
>> ok: [**]
>>
>> TASK: [syslog-client | Check if new upstart job is needed]
>> 
>> changed: [**]
>>
>> TASK: [syslog-client | Stop the syslog-ng service before upgrading to
>> upstart] ***
>> fatal: [**] => Traceback (most recent call last):
>>   File "/usr/lib/python2.7/dist-packages/ansible/runner/__init__.py", line
>> 561, in _executor
>> exec_rc = self._executor_internal(host, new_stdin)
>>   File "/usr/lib/python2.7/dist-packages/ansible/runner/__init__.py", line
>> 666, in _executor_internal
>> return self._executor_internal_inner(host, self.module_name,
>> self.module_args, inject, port, complex_args=complex_args)
>>   File "/usr/lib/python2.7/dist-packages/ansible/runner/__init__.py", line
>> 756, in _executor_internal_inner
>> if not utils.check_conditional(cond, self.basedir, inject,
>> fail_on_undefined=self.error_on_undefined_vars):
>>   File "/usr/lib/python2.7/dist-packages/ansible/utils/__init__.py", line
>> 255, in check_conditional
>> original = str(conditional).replace("jinja2_compare ","")
>> UnicodeEncodeError: 'ascii' codec can't encode characters in position
>> 15-16: ordinal not in range(128)
>>
>>
>> FATAL: all hosts have already failed -- aborting
>>
>>
>> I have commented out the play that it errors out on, but the error just
>> happens on the next play. So I think the error might have to do with the "
>> register: upstart" bit. But I can't figure out where the problem is.
>>
>> Thanks in advance for any help you can provide.
>
> --
> 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 

Re: [ansible-project] Use hostvars as hosts names in playbooks

2015-09-02 Thread Emmanuel Lacour


Le mercredi 2 septembre 2015 14:34:02 UTC+2, Brian Coca a écrit :
>
> hostvars are not usable in 'hosts:' clause, use group_by if you want 
> to create adhoc groups for use in subsequent plays. 
>
>
thanks, thought I discovered delegate_to which seems to be exacly what I 
need, i.e. a playbook on the new vm with preliminary tasks executed on 
hypervisors to setup the vm, then tasks on the vm, then I may add tasks 
delegated_to backup servers to register host for example. Nice! 

-- 
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/eca38d34-a6dd-48e1-8afe-aa0fc7f93704%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: Ansible 2.0 os_server 404 image not found

2015-09-02 Thread James Martin
I've successfully launched servers with os_server as of today, with the 
latest version of shade, so I don't think the module is completely broken. 
 I do see that a 404 is being returned in your error, which is a "page not 
found" status code (https://en.wikipedia.org/wiki/HTTP_404).  My guess is 
that you're getting the initial token after keystone authentication, but a 
subsequent request is failing.  Since you don't have access to the 
openstack infrastructure to debug, I'd recommend using tcpdump and taking a 
look at what request is causing the 404.

- James

On Wednesday, September 2, 2015 at 12:14:08 PM UTC-5, V Benincosa wrote:
>
> Hi! 
> Checking out the 2.0 release and having some problems launching machine. 
>  When I run: 
>
> ansible-playbook lab-machines.yml 
>
> - name: Ensure lab machines are up
>   connection: local
>   hosts: localhost
>   vars_files:
>- vars/metacloud_vars.yml
>
>   tasks: 
>   - name: Ensure lab machines are up
> os_server:
>   state: present
> #  auth: 
> #auth_url: "{{ lookup('env', 'OS_AUTH_URL') }}"
> #username: "{{ lookup('env', 'OS_USERNAME') }}"
> #password: "{{ lookup('env', 'OS_PASSWORD') }}"
> #project_name: "{{ lookup('env', 'OS_TENANT_NAME') }}"
>   name: "{{ item }}"
>   key_name: "{{ keypair }}"
>   flavor: "{{ m1large }}"
>   floating_ip_pools:
> - "{{ floating_ip_pool }}"
>   security_groups: "{{ security_group }}"
>   userdata:  "{{ lookup('file', 'files/coreos-python.sh') }}"
>   image: CoreOS723
> with_items: 
>   - lab01
> I get the error:  
>
> failed: [localhost] => (item=lab01) => {"extra_data": null, "failed": 
> true, "item": "lab01", "msg": "Error fetching image list: 404 Not Found: 
> The resource could not be found. (HTTP 404)"}
>
> So you're probably thinking: I don't have that image named CoreOS723 
> defined.  I tried nova image-list and that shows the image: 
>
> $ nova image-show CoreOS723
> +---+--+
> | Property  | Value|
> +---+--+
> | OS-EXT-IMG-SIZE:size  | 493813760|
> | created   | 2015-08-11T23:46:41Z |
> | id| c762b1d5-5177-421f-8870-aa77b7fe03a2 |
> | metadata architecture | x86_64   |
> | metadata description  | CoreOS 723   |
> | minDisk   | 6|
> | minRam| 1000 |
> | name  | CoreOS723|
> | progress  | 100  |
> | status| ACTIVE   |
> | updated   | 2015-08-11T23:50:12Z |
> +---+--+
>
> But then I noticed that glance image-list does not: 
> glance image-list
> ++--+
> | ID | Name |
> ++--+
> ++--+
>
> This worked with the older nova commands before but seems to not work with 
> os_compute now.  I'm doing this on Cisco's MetaCloud so I don't have 
> operator permissions to change things.  I'm using python-glanceclient 1.0.0
>
> Thanks for any pointers. 
>

-- 
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/6b47fe88-0512-4d7e-936a-202d4cb228e6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Conditional loop messes up the following task that does a with_item

2015-09-02 Thread Samnang Sen
I store the modules I need to deploy within Consul. It consist of both Perl 
and PHP modules so on our web servers I only want to install the modules 
associated with PHP. The following playbook works as long as there are TWO 
matching modules. In my test case I have two keys with one of them being a 
key related to PHP deploys. The error I get is:

fatal: [127.0.0.1] => with_items expects a list or a set

FATAL: all hosts have already failed -- aborting

If I remove the "when" clause and only have one key within Consul, it also 
works. How do I get around the error if I'm using a "when" clause and all 
that remainds within "deploy_list_result" is just one item?

## PLAYBOOK ##

  - consul_kv: host=indeploy001 action=get key=deploylist/{{ jira_ticket }} 
keys=True
register: modules_to_deploy

  - name: set fact
set_fact: deploy_list="{{ item | replace("deploylist/" + jira_ticket + 
"/",'') }}-{{ lookup('consul_kv',item) }}"
when: "'{{ item | replace('deploylist/' + jira_ticket + '/','') }}' in 
php_modules"
with_items: '{{ modules_to_deploy.value }}'
register: deploy_list_result

  - shell: sudo rpm -Uvh {{ rpm_repo }}/aria-{{ item }}.rpm --force --test
with_items: "{{ deploy_list_result.results | 
map(attribute='ansible_facts.deploy_list') | sort }}"
register: php_command_result

-- 
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/7f307ebe-2c47-469c-9724-46c30c7e5a42%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Re: Ansible 2.0 os_server 404 image not found

2015-09-02 Thread Greg DeKoenigsberg
So this is specifically in the os_ modules, right?

--g

On Wed, Sep 2, 2015 at 2:34 PM, V Benincosa  wrote:
>
> well, that was the wrong way to go.  Shade reinstalled version
> python-glanceclient 1.0.0 so I guess I need to figure out why glance doesn't
> return any images. Metacloud uses icehouse.
>
> --
> 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/629025da-885b-40cf-87df-1cf0261d0d56%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.



-- 
Greg DeKoenigsberg
Ansible Community Guy

Find out why SD Times named Ansible
their #1 Company to Watch in 2015:
http://sdtimes.com/companies-watch-2015/

-- 
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/CAM1FbhHd1NCVkdfAT1s3GygXo8-ebUkDHT9jHEhkUVaORGou-g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: Ansible 2.0 os_server 404 image not found

2015-09-02 Thread V Benincosa
Running: export OS_IMAGE_API_VERSION=1 (and placing in .bash_profile) will 
now make glance image-list show something... but ansible still gets the 
same error.  

-- 
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/71ab607d-2fa2-41f8-97a7-df2d0a5b0316%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Looking for a way execute tasks in included file based on condition

2015-09-02 Thread Joseph Djomeda
Hello Guys,

This has been probably solved before so apologies if this is a repeat. I
was confused about tasks in a include file being run even though the
condition for the include itself is not true.

so in my main.yml I have an include system like a switch kind of logique:
say

- include: this.yml
  when: include_this_enable|default(false)

- include: that.yml
  when: include_that_enable|default(false)

To my surprise I needed to also add the when conditions to this.yml and
that.yml for it to work before everything would run otherwise as shown in
here http://pastie.org/10392488

when this.yml has a lot of tasks this become difficult to do. How to
strictly run tasks in this.yml only base on a condition?

Thanks in advance

Best Regads,
-- 
Joseph Kodjo-Kuma Djomeda
check out my pains at : www.mycodingpains.com
We become what we think about ourselves

-- 
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/CAKDXoa%2BWp2ppPVZ%2BhuW7OP80ScHpTxQce0yV4T6aV1Ej9Pi0UQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: Ansible 2.0 os_server 404 image not found

2015-09-02 Thread V Benincosa

well, that was the wrong way to go.  Shade reinstalled version 
python-glanceclient 1.0.0 so I guess I need to figure out why glance 
doesn't return any images. Metacloud uses icehouse. 

-- 
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/629025da-885b-40cf-87df-1cf0261d0d56%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: Ansible 2.0 os_server 404 image not found

2015-09-02 Thread V Benincosa
I downgraded python-glanceclient to 0.19.0 and it seems to get past that 
error.  Now I get: 
failed: [localhost] => (item=lab01) => {"extra_data": null, "failed": true, 
"item": "lab01", "msg": "Error fetching image list: Expected endpoint"}

So it looks like I'll have to downgrade most of my python openstack clients 
one revision for this to work in my environment. 

On Wednesday, September 2, 2015 at 10:14:08 AM UTC-7, V Benincosa wrote:
>
> Hi! 
> Checking out the 2.0 release and having some problems launching machine. 
>  When I run: 
>
> ansible-playbook lab-machines.yml 
>
> - name: Ensure lab machines are up
>   connection: local
>   hosts: localhost
>   vars_files:
>- vars/metacloud_vars.yml
>
>   tasks: 
>   - name: Ensure lab machines are up
> os_server:
>   state: present
> #  auth: 
> #auth_url: "{{ lookup('env', 'OS_AUTH_URL') }}"
> #username: "{{ lookup('env', 'OS_USERNAME') }}"
> #password: "{{ lookup('env', 'OS_PASSWORD') }}"
> #project_name: "{{ lookup('env', 'OS_TENANT_NAME') }}"
>   name: "{{ item }}"
>   key_name: "{{ keypair }}"
>   flavor: "{{ m1large }}"
>   floating_ip_pools:
> - "{{ floating_ip_pool }}"
>   security_groups: "{{ security_group }}"
>   userdata:  "{{ lookup('file', 'files/coreos-python.sh') }}"
>   image: CoreOS723
> with_items: 
>   - lab01
> I get the error:  
>
> failed: [localhost] => (item=lab01) => {"extra_data": null, "failed": 
> true, "item": "lab01", "msg": "Error fetching image list: 404 Not Found: 
> The resource could not be found. (HTTP 404)"}
>
> So you're probably thinking: I don't have that image named CoreOS723 
> defined.  I tried nova image-list and that shows the image: 
>
> $ nova image-show CoreOS723
> +---+--+
> | Property  | Value|
> +---+--+
> | OS-EXT-IMG-SIZE:size  | 493813760|
> | created   | 2015-08-11T23:46:41Z |
> | id| c762b1d5-5177-421f-8870-aa77b7fe03a2 |
> | metadata architecture | x86_64   |
> | metadata description  | CoreOS 723   |
> | minDisk   | 6|
> | minRam| 1000 |
> | name  | CoreOS723|
> | progress  | 100  |
> | status| ACTIVE   |
> | updated   | 2015-08-11T23:50:12Z |
> +---+--+
>
> But then I noticed that glance image-list does not: 
> glance image-list
> ++--+
> | ID | Name |
> ++--+
> ++--+
>
> This worked with the older nova commands before but seems to not work with 
> os_compute now.  I'm doing this on Cisco's MetaCloud so I don't have 
> operator permissions to change things.  I'm using python-glanceclient 1.0.0
>
> Thanks for any pointers. 
>

-- 
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/3fb65edf-dfdf-49b4-b89e-0cb3dd3a2cb1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Ansible 2.0 os_server 404 image not found

2015-09-02 Thread V Benincosa
Hi! 
Checking out the 2.0 release and having some problems launching machine. 
 When I run: 

ansible-playbook lab-machines.yml 

- name: Ensure lab machines are up
  connection: local
  hosts: localhost
  vars_files:
   - vars/metacloud_vars.yml

  tasks: 
  - name: Ensure lab machines are up
os_server:
  state: present
#  auth: 
#auth_url: "{{ lookup('env', 'OS_AUTH_URL') }}"
#username: "{{ lookup('env', 'OS_USERNAME') }}"
#password: "{{ lookup('env', 'OS_PASSWORD') }}"
#project_name: "{{ lookup('env', 'OS_TENANT_NAME') }}"
  name: "{{ item }}"
  key_name: "{{ keypair }}"
  flavor: "{{ m1large }}"
  floating_ip_pools:
- "{{ floating_ip_pool }}"
  security_groups: "{{ security_group }}"
  userdata:  "{{ lookup('file', 'files/coreos-python.sh') }}"
  image: CoreOS723
with_items: 
  - lab01
I get the error:  

failed: [localhost] => (item=lab01) => {"extra_data": null, "failed": true, 
"item": "lab01", "msg": "Error fetching image list: 404 Not Found: The 
resource could not be found. (HTTP 404)"}

So you're probably thinking: I don't have that image named CoreOS723 
defined.  I tried nova image-list and that shows the image: 

$ nova image-show CoreOS723
+---+--+
| Property  | Value|
+---+--+
| OS-EXT-IMG-SIZE:size  | 493813760|
| created   | 2015-08-11T23:46:41Z |
| id| c762b1d5-5177-421f-8870-aa77b7fe03a2 |
| metadata architecture | x86_64   |
| metadata description  | CoreOS 723   |
| minDisk   | 6|
| minRam| 1000 |
| name  | CoreOS723|
| progress  | 100  |
| status| ACTIVE   |
| updated   | 2015-08-11T23:50:12Z |
+---+--+

But then I noticed that glance image-list does not: 
glance image-list
++--+
| ID | Name |
++--+
++--+

This worked with the older nova commands before but seems to not work with 
os_compute now.  I'm doing this on Cisco's MetaCloud so I don't have 
operator permissions to change things.  I'm using python-glanceclient 1.0.0

Thanks for any pointers. 

-- 
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/e3bc0f19-6f91-44a4-82f0-4a3bd659e99f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] win_updates not working

2015-09-02 Thread Dimitri Yioulos
I'm trying to use the extras module win_updates to update my Windows 
servers.  The play runs without failure, but no updates are applied.

Ideally, I want the install all available updates (e.g. critical, 
important, optional, etc.).  I've created a play to look like this:

---

- hosts: windows
  gather_facts: true

  tasks:
  - name: win update
win_updates:
   category: security

What do I need to do to make this install the updates, and how to I install 
all available updates?

Thanks.

Dimitri

-- 
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/cd7fe2fa-fee8-4997-88ba-c324190791b1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] variable precedence seems hopelessly broken

2015-09-02 Thread Dan Stillman
I haven't received a response on this, but since I posted it, the 
various variable precedence bugs I've reported have continued to 
reappear and disappear through successive commits. Usually when one is 
fixed, another is broken. One issue [1] was even closed as a 
"misunderstanding" (despite the supposedly correct behavior making very 
little sense) before being acknowledged as a bug (and then being fixed, 
and then regressing again), suggesting that Ansible developers aren't 
even clear on how variables _should_ work. Currently, a number of the 
bugs (including a P1 bug that was previously fixed [2]) are present in 
devel.


I've provided simple test cases with every bug report and suggested a 
reorganization of the test suite that would allow them to be easily 
incorporated. I don't see any point in continuing to report these — or, 
honestly, in continuing to try to use Ansible — if no effort is made to 
ensure that these dangerous bugs stay fixed.


[1] https://github.com/ansible/ansible/issues/11996
[2] https://github.com/ansible/ansible/issues/9497

On 8/18/15 7:08 PM, Dan Stillman wrote:
I really like Ansible and have built a large infrastructure around it, 
but I'm finding it untrustworthy to the point of being unusable.


In the last 9 months, I've reported 4 variable precedence bugs:

https://github.com/ansible/ansible/issues?utf8=%E2%9C%93&q=is%3Aissue+author%3Adstillman+ 



The first two were marked as P1 and fixed, and the third was confirmed 
as P2 in December but remains open. The last one, which I reported 
today, occurs in 1.9.3 but is fixed on devel for 2.0 — and yet devel 
appears to break one of the P1 bugs (#9498) again, despite my 
including a test case with the original report (as I've done for all 
of them). The other P1 bug also disappeared and reappeared a couple 
times during 1.8 development as other variable bugs were fixed, which 
seems to be the general pattern for these bugs.


If it's not clear, these are incredibly dangerous bugs in production 
environments, because they can cause services to silently be rolled 
out in the wrong location or with the wrong configuration. (I noticed 
this because a service had been deployed to a directory with the name 
of another service, resulting in two copies of the service trying to 
run — though fortunately this was on a dev machine.) The safest 
solution I've found is to configure different roles on the systems 
separately using tags, but that somewhat defeats the purpose of a 
central configuration management tool (and actually doesn't even avoid 
the P1 bug that's broken again on devel, so I guess I should say the 
safest solution is not to use variables at all).


It's possible I'm using variables somewhat differently than most 
people using Ansible — the bugs I've reported all depend on 
include_vars within a role, which I use extensively — but there seem 
to be quite a few reports of variable bugs, and none of the issues 
I've reported have been marked as invalid.


I don't want to abandon Ansible, but I can't keep using it if I can't 
trust it to deploy services correctly. I also shouldn't have to keep 
my own set of tests that I run whenever I try a new version just to 
make sure dangerous bugs that I've reported previously — with those 
same tests — haven't regressed.


If the current variable precedence system is salvageable (and I'm not 
convinced it is or should be), it seems like many more integration 
test cases are needed, all run in separate processes and — needless to 
say — with new ones added whenever variable bugs are found.


(I think a contributing factor here may actually be the layout of the 
integration test suite. Most of the test cases I've submitted require 
multiple roles, but adding those to the current suite would get messy 
quickly, since there's just a single root directory and single roles 
directory for all integration tests. I think it'd be much cleaner to 
use a subdirectory for each integration test, with a top-level 
playbook in each, to keep all test files grouped together and avoid 
accidental interactions with other files. That would also make it much 
simpler to add people's test contributions.)


Anyway, I hope something can be done. As it stands now, I'm nervous 
every time Ansible runs.




--
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/55E72474.1020508%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Re: is su_exe/become_exe broken in v2?

2015-09-02 Thread Brian Coca
Not as much 'changed' as  'yet to be implemented'.



-- 
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/CAJ5XC8nTfStrFtDLyBFzUanxN1bTbT_sW-dLxRz72Ljq5MFrvA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Re: is su_exe/become_exe broken in v2?

2015-09-02 Thread Edgars
su_flags worked before, why it was changed?

trešdiena, 2015. gada 2. septembris 17:02:22 UTC+2, Brian Coca rakstīja:
>
> They currently only work for sudo 
>
>
> -- 
> 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/0d4bc77c-18ec-4f34-8401-8d7086c0fe56%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Re: is su_exe/become_exe broken in v2?

2015-09-02 Thread Brian Coca
They currently only work for sudo


-- 
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/CAJ5XC8kKnKfToubHRMW53DNidnGsEg25qgTG_5Lub0tU_JDbfw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: is su_exe/become_exe broken in v2?

2015-09-02 Thread Edgars
I just noticed that su_flags and become_flags settings are ignored. 

Edgars

trešdiena, 2015. gada 2. septembris 12:02:39 UTC+2, Edgars rakstīja:
>
> Hi
>
> I just pulled latest ansible from git and installed it. And it seems that 
> su_exe functionality is not working anymore. Regardless of what I set as 
> su_exe, ansible tries to execute su. I also tried to set become_exe to 
> something else not su but ansible executes su.
>
> [privilege_escalation]
> become = True
> become_ask_pass = True
> become_user = root
> become_method = su
> become_exe = /opt/CA/AccessControl/bin/sesu
> become_flags = -
>
> EXEC /bin/sh -c 'su  root -c "/bin/sh -c '"'"'echo 
>> BECOME-SUCCESS-qvthdnsaxbhytsulkyamdelobeatwxnn;
>
>
> Edgars
>

-- 
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/126472d6-a428-4500-9e63-a2055a47630a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] galaxy.ansible.com is not responding

2015-09-02 Thread Brian Coca
@Greg the problem was solved earlier this morning (EDT), the site was
unavailable for a time.




-- 
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%3DsiKLhoWmn%2BN_x-XOUzAFD9t%3DG7SJzbWQKpAZY4LRkeA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Re: is su_exe/become_exe broken in v2?

2015-09-02 Thread Edgars
Confirmed

trešdiena, 2015. gada 2. septembris 15:52:02 UTC+2, Brian Coca rakstīja:
>
> just fixed become_exe also 
>
> On Wed, Sep 2, 2015 at 9:43 AM, Edgars > 
> wrote: 
> > Thanks, it works now with su_exe but still does not work with 
> become_exe. 
> > But I am not sure if it supposed to be working with become_exe. 
> > 
> > Edgar 
> > 
> > trešdiena, 2015. gada 2. septembris 12:02:39 UTC+2, Edgars rakstīja: 
> >> 
> >> Hi 
> >> 
> >> I just pulled latest ansible from git and installed it. And it seems 
> that 
> >> su_exe functionality is not working anymore. Regardless of what I set 
> as 
> >> su_exe, ansible tries to execute su. I also tried to set become_exe to 
> >> something else not su but ansible executes su. 
> >> 
> >> [privilege_escalation] 
> >> become = True 
> >> become_ask_pass = True 
> >> become_user = root 
> >> become_method = su 
> >> become_exe = /opt/CA/AccessControl/bin/sesu 
> >> become_flags = - 
> >> 
> >>> EXEC /bin/sh -c 'su  root -c "/bin/sh -c '"'"'echo 
> >>> BECOME-SUCCESS-qvthdnsaxbhytsulkyamdelobeatwxnn; 
> >> 
> >> 
> >> Edgars 
> > 
> > -- 
> > 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/e668eeef-2931-435e-a2ff-4867759522c2%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/6fb8af95-cd42-4686-bb13-6cd597e6ac87%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] galaxy.ansible.com is not responding

2015-09-02 Thread Greg DeKoenigsberg
Not seeing this... any details? From the web UI or the client? Is it
still happening?

On Wed, Sep 2, 2015 at 6:03 AM, Cenk Çetinkaya  wrote:
> Error message is ERR_TOO_MANY_REDIRECTS on chrome. ansibel-galaxy install
> command gives error that message is "the API server (galaxy.ansible.com) is
> not responding, please try again later."
>
> --
> 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/8b492f2e-f351-4f94-878b-57c8f075c8fb%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



-- 
Greg DeKoenigsberg
Ansible Community Guy

Find out why SD Times named Ansible
their #1 Company to Watch in 2015:
http://sdtimes.com/companies-watch-2015/

-- 
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/CAM1FbhET%3D9xsrsXWBmoyjiyykme5e-qj_t37VmqyrBp1aHfg_A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Ansible galaxy syan READM.md is not present when importing/updating role

2015-09-02 Thread James Cammarata
Hi Mauricio, we actually just ran into this with another user this morning.
It appears that the code we have to read in the README.md files does not
like Unicode, so the workaround currently is to remove non-ascii characters
from it. We'll have a fix in for this in the next release. Sorry for the
inconvenience!

James Cammarata
Director, Ansible Core Engineering
github: jimi-c

On Tue, Sep 1, 2015 at 4:53 PM, Mauricio Sánchez 
wrote:

> I'm trying to import/update my roles hosted on Github but Ansible Galaxy
> says:
>
> FAILED:
> Failed to find a README.md. All role repositories must include a
> README.md. Please refer to the 'Getting Started' documentation regarding
> role requirements. Once the issue has been corrected in the repsotitory,
> you can retry the import.
>
> See this role in Github: https://github.com/Aplyca/ansible-role-php
>
> All of my roles were working fine (updating and importing) a couple of
> weeks ago in Ansible Galaxy. The README.md is present in the root of the
> repo of all my roles.  Is this an issue on Galaxy? or do I missing
> something?, maybe the README.md markdown format or the location of the file?
>
> --
> 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/f87ece14-c54a-4852-a0e9-996e269ae273%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/CAMFyvFgMwctT47Kg9nGT%2B5L2uWtgd9wr8%2B%2BuU6gvbrxO2jF_LQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Re: is su_exe/become_exe broken in v2?

2015-09-02 Thread Brian Coca
just fixed become_exe also

On Wed, Sep 2, 2015 at 9:43 AM, Edgars  wrote:
> Thanks, it works now with su_exe but still does not work with become_exe.
> But I am not sure if it supposed to be working with become_exe.
>
> Edgar
>
> trešdiena, 2015. gada 2. septembris 12:02:39 UTC+2, Edgars rakstīja:
>>
>> Hi
>>
>> I just pulled latest ansible from git and installed it. And it seems that
>> su_exe functionality is not working anymore. Regardless of what I set as
>> su_exe, ansible tries to execute su. I also tried to set become_exe to
>> something else not su but ansible executes su.
>>
>> [privilege_escalation]
>> become = True
>> become_ask_pass = True
>> become_user = root
>> become_method = su
>> become_exe = /opt/CA/AccessControl/bin/sesu
>> become_flags = -
>>
>>> EXEC /bin/sh -c 'su  root -c "/bin/sh -c '"'"'echo
>>> BECOME-SUCCESS-qvthdnsaxbhytsulkyamdelobeatwxnn;
>>
>>
>> Edgars
>
> --
> 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/e668eeef-2931-435e-a2ff-4867759522c2%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/CAJ5XC8mL%2BbkiwXAPnQqzuXUFHeiHSv89deqmrGK%2BStgO7Ex5vQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: is su_exe/become_exe broken in v2?

2015-09-02 Thread Edgars
Thanks, it works now with su_exe but still does not work with become_exe. 
But I am not sure if it supposed to be working with become_exe.

Edgar

trešdiena, 2015. gada 2. septembris 12:02:39 UTC+2, Edgars rakstīja:
>
> Hi
>
> I just pulled latest ansible from git and installed it. And it seems that 
> su_exe functionality is not working anymore. Regardless of what I set as 
> su_exe, ansible tries to execute su. I also tried to set become_exe to 
> something else not su but ansible executes su.
>
> [privilege_escalation]
> become = True
> become_ask_pass = True
> become_user = root
> become_method = su
> become_exe = /opt/CA/AccessControl/bin/sesu
> become_flags = -
>
> EXEC /bin/sh -c 'su  root -c "/bin/sh -c '"'"'echo 
>> BECOME-SUCCESS-qvthdnsaxbhytsulkyamdelobeatwxnn;
>
>
> Edgars
>

-- 
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/e668eeef-2931-435e-a2ff-4867759522c2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] is su_exe/become_exe broken in v2?

2015-09-02 Thread Brian Coca
I just fixed this, pull latest and try again.

-- 
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/CAJ5XC8mbAF%2BZovH-YtGM5RqR6FFuU7Gu56bLw-X%2B0%2BLWt0RnpA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] os x yosimite, strange vault problems with gvim

2015-09-02 Thread pixel fairy
gvim never saves changes to files in vault. vim does just fine. just 
putting this here for google to find before someone else wastes 
$i_wont_admit time on it. dont have time to do the right thing and figure 
out why.

-- 
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/7a779b14-f454-4866-815f-69862e6df102%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Ansible galaxy syan READM.md is not present when importing/updating role

2015-09-02 Thread Greg DeKoenigsberg
We'll look into it.
On Sep 2, 2015 8:24 AM, "Mauricio Sánchez"  wrote:

> I'm trying to import/update my roles hosted on Github but Ansible Galaxy
> says:
>
> FAILED:
> Failed to find a README.md. All role repositories must include a
> README.md. Please refer to the 'Getting Started' documentation regarding
> role requirements. Once the issue has been corrected in the repsotitory,
> you can retry the import.
>
> See this role in Github: https://github.com/Aplyca/ansible-role-php
>
> All of my roles were working fine (updating and importing) a couple of
> weeks ago in Ansible Galaxy. The README.md is present in the root of the
> repo of all my roles.  Is this an issue on Galaxy? or do I missing
> something?, maybe the README.md markdown format or the location of the file?
>
> --
> 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/f87ece14-c54a-4852-a0e9-996e269ae273%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/CAM1FbhEVar-jy3KnHxctdiczJyHN5U9NEBJDr%3DwJOa%3DCQt0O4w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] os x yosimite, pip tries to make ansible run in python3

2015-09-02 Thread Greg DeKoenigsberg
May be worth a new note in our docs.
On Sep 2, 2015 8:54 AM, "pixel fairy"  wrote:

> yup, the default pip was 3. dont know how that changed.
>
> On Wednesday, September 2, 2015 at 5:50:15 AM UTC-7, Brian Coca wrote:
>>
>> you might be using pip3 and need pip2.
>>
>>
>>
>> --
>> 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/ccecdaae-8908-4d97-a9c6-7eb75c5f3a60%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/CAM1FbhGef-E6wwt8ihRWpa_h964DrZO7hBowtQw4%2B_fi0BZQcw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] os x yosimite, pip tries to make ansible run in python3

2015-09-02 Thread pixel fairy
yup, the default pip was 3. dont know how that changed. 

On Wednesday, September 2, 2015 at 5:50:15 AM UTC-7, Brian Coca wrote:
>
> you might be using pip3 and need pip2. 
>
>
>
> -- 
> 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/ccecdaae-8908-4d97-a9c6-7eb75c5f3a60%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Display Free Mac Address of a VCenter or already used

2015-09-02 Thread Andrea Perini
I'm creating VMs forcing mac address.
I'm looking for a way to create a pool of available mac Addresses to use 
them for creating VMs; or just a way to see which mac addresses on my 
vCenter are already used by my VMs.
Any hints?

I've found a module called ansible-provisioning but I can figure out how to 
use it for my purpose.
https://github.com/ansible-provisioning/ansible-provisioning

-- 
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/fd808929-e699-4f19-a5b4-7c4ec31e66e8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] os x yosimite, pip tries to make ansible run in python3

2015-09-02 Thread Brian Coca
you might be using pip3 and need pip2.



-- 
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/CAJ5XC8m9jm7AEkipOknwd%3DrghJitLeZTG4SbRogW61NjdiOLQA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Issue with default value

2015-09-02 Thread Brian Coca
default is a fitler from the jinaj2 project, the 'fix' would have to
happen there

On Tue, Sep 1, 2015 at 8:52 AM, Paul Tötterman  wrote:
>> ((ansible_eth1|default({})["ipv4"]|default({}))["address"] |
>> default("127.0.0.1")
>
>
> Ugh. I was expecting something like try: ... except KeyError: ...
>
> Is there any chance of fixing default to work with multiple levels without
> so much typing? I think it would be a rather big usability improvement.
>
> Cheers,
> Paul
>
> --
> 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/51c31f67-be57-4b97-845c-256465f9f573%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/CAJ5XC8kN5ZJCcmRPJjNCFO4ozq9T_nGH%3D_E44KSTVjXOfwutRg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] os x yosimite, pip tries to make ansible run in python3

2015-09-02 Thread pixel fairy
bonechar:~# pip install ansible
Collecting ansible
  Downloading ansible-1.9.2.tar.gz (927kB)
100% || 929kB 641kB/s 
Requirement already satisfied (use --upgrade to upgrade): paramiko in 
/usr/local/lib/python3.4/site-packages (from ansible)
Requirement already satisfied (use --upgrade to upgrade): jinja2 in 
/usr/local/lib/python3.4/site-packages (from ansible)
...
bonechar:~ pixel$ which ansible
/usr/local/bin/ansible
bonechar:~ pixel$ ansible-vault edit --help
  File "/usr/local/bin/ansible-vault", line 148
print "Decryption successful"
^
SyntaxError: Missing parentheses in call to 'print'
bonechar:~ pixel$ ansible --version
  File "/usr/local/bin/ansible", line 203
except errors.AnsibleError, e:
  ^
SyntaxError: invalid syntax


the one from git runs fines, but im kinda iffy about a dev version. maybe i 
should check out stable?

-- 
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/80f364d1-e3c7-46f8-b140-7f2512c4d6b0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Use hostvars as hosts names in playbooks

2015-09-02 Thread Brian Coca
hostvars are not usable in 'hosts:' clause, use group_by if you want
to create adhoc groups for use in subsequent plays.



-- 
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/CAJ5XC8k7SXDy1aqifagnCyL%3DmH5VnsaF23L%2B1hpr%3DiNG%2BkNMXw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] galaxy.ansible.com is not responding

2015-09-02 Thread Cenk Çetinkaya
Error message is ERR_TOO_MANY_REDIRECTS on chrome. ansibel-galaxy install 
command gives error that message is "the API server (galaxy.ansible.com) is 
not responding, please try again later."

-- 
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/8b492f2e-f351-4f94-878b-57c8f075c8fb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Ansible galaxy syan READM.md is not present when importing/updating role

2015-09-02 Thread Mauricio Sánchez
I'm trying to import/update my roles hosted on Github but Ansible Galaxy 
says:

FAILED:
Failed to find a README.md. All role repositories must include a README.md. 
Please refer to the 'Getting Started' documentation regarding role 
requirements. Once the issue has been corrected in the repsotitory, you can 
retry the import.

See this role in Github: https://github.com/Aplyca/ansible-role-php

All of my roles were working fine (updating and importing) a couple of 
weeks ago in Ansible Galaxy. The README.md is present in the root of the 
repo of all my roles.  Is this an issue on Galaxy? or do I missing 
something?, maybe the README.md markdown format or the location of the file?

-- 
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/f87ece14-c54a-4852-a0e9-996e269ae273%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Use hostvars as hosts names in playbooks

2015-09-02 Thread Emmanuel Lacour
Dear ansible users,

I try to write a paybook where I first get a host name from a host, then 
would like to do thinks on this host name.

Here is a try:

---
- name: Get VM inventory
  hosts: "{{vm}}"
  gather_facts: False
  tasks:
- debug: msg="{{hostvars[vm]['cluster']}}"

- name: Get free hypervisor
  hosts: '{{hostvars[vm]["cluster"]}}'
  gather_facts: False
  tasks:
- debug: msg='{{hostvars[vm]["cluster"]}}'


Which I call with ansible-playbook myplaybook.yml -e vm=foo

debug on "Get VM inventory" print the right cluster name
"Get free hypervisor" doesn't match any host. Thought if I force the 
cluster name in hosts, the debug properly display the vm cluster name.


Is this unsupported? A syntax error?

-- 
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/4c666f90-ed5e-4997-a565-bd4a1fb24e17%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: How to elegantly change root password with mysql_user

2015-09-02 Thread esco real
I do this (in this order):
- name: set password
  mysql_user: name={{ mysql_user }} password={{ hostvars[product + '_' + 
inventory_hostname + '_' + mysql_user].password }}
 
- name: create client config
  template: src=client.my.cnf dest=~/.my.cnf mode=0600



client.my.cnf:
[client]
user={{ mysql_user }}
password={{ hostvars[product + '_' + inventory_hostname + '_' + 
mysql_user].password 
}}


By using .my.cnf with [client]-config you would have the login information 
to the database on the server (for example in /root/.my.cnf with 600). The 
variable for the password is just an example from my inventory..



-- 
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/990a1aa1-c794-4bdb-90a3-19c2339adab2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] How to elegantly change root password with mysql_user

2015-09-02 Thread Eric Feliksik
When I install mysql, default root password is empty. I then use ansible to 
set the password: 
```
- name: set root password, if it is empty now
  mysql_user: login_user=root login_password='' name=root 
password='{{desired_pass}}' state=present 
```

But 2nd time this playbook runs, the task fails. I can set ignore_errors: 
True, but this is prone to other failures as well. 

Alternatively, I have the approach of settings the desired password twice: 
once logging in with login_password={{desired_pass}}, once with 
login_password=''. If one of those succeeds, we're fine: 

```
- name: set root password, if it is empty now
  mysql_user: login_user=root login_password='{{item}}' 
login_host=localhost name=root password='{{desired_pass}}' state=present 
  with_items:
   - '{{root_pass}}'
   - ''
  register: set_root_pass_result
  ignore_errors: True
 
- fail: msg="could not login with any of the provided passwords"
  when: "(set_root_pass_result.results[0].failed is defined) and 
(set_root_pass_result.results[1].failed is defined)"
```

Is this supposed to be this tricky, or is there a simpler way? 

-- 
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/85cebf01-45df-4cf4-9d41-6b42759bf1ab%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] is su_exe/become_exe broken in v2?

2015-09-02 Thread Edgars
Hi

I just pulled latest ansible from git and installed it. And it seems that 
su_exe functionality is not working anymore. Regardless of what I set as 
su_exe, ansible tries to execute su. I also tried to set become_exe to 
something else not su but ansible executes su.

[privilege_escalation]
become = True
become_ask_pass = True
become_user = root
become_method = su
become_exe = /opt/CA/AccessControl/bin/sesu
become_flags = -

EXEC /bin/sh -c 'su  root -c "/bin/sh -c '"'"'echo 
> BECOME-SUCCESS-qvthdnsaxbhytsulkyamdelobeatwxnn;


Edgars

-- 
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/58cfb1ae-0dea-4430-9b67-86673ab498d0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Is there something like puppet librarian or R10K for Ansible?

2015-09-02 Thread Javier Palacios
Its maybe an issue with the expression I did use `where the inventory
lives` means under the same directory where is your inventory. So, it looks
for roles on /path/to/playbok/roles and then on /path/to/inventory/roles.

Javier Palacios

On Mon, Aug 31, 2015 at 11:24 PM, Greg DeKoenigsberg 
wrote:

> On Mon, Aug 31, 2015 at 4:23 PM, Jeffrey Lee  wrote:
> > How would you store roles with your inventory? Isn't the inventory file
> just
> > a grouping of hosts?
>
> Well, it's a grouping of hosts and variables. If I understand Javier's
> intent, I think he's suggesting that you use variables in inventory
> files to specify the role versions that you want to access.
>
> --g
>
> > -Jeff
> >
> > On Monday, August 31, 2015 at 11:27:16 AM UTC-4, Javier Palacios wrote:
> >>
> >>
> >> On Fri, Aug 28, 2015 at 10:01 PM, Jeffrey Lee 
> wrote:
> >>>
> >>> I'm looking for a way to manage different versions of Ansible roles
> that
> >>> I am writing when deploying applications. For instance if one
> application
> >>> needs v1 of an Ansible role I wrote and another application needs v2
> of an
> >>> Ansible role, is there a tool like puppet librarian or R10K that I can
> use
> >>> with Ansible that will assemble the entire Ansible package for me with
> the
> >>> correct versions of the roles?
> >>
> >>
> >> In case you didn't know roles are looked up wherever inventory lives
> _and_
> >> wherever the playbook lives (this one rules). So you can keep your
> standard
> >> roles along the inventory and the higher version ones along the
> playbooks
> >> where they are used. It might not suit your needs, and it will
> potentially
> >> end in as many directories as playbooks you have, but might help.
> >>
> >> Javier Palacios
> >
> > --
> > 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/3ab83cd2-259f-4a04-bced-43c048fc58a2%40googlegroups.com
> .
> >
> > For more options, visit https://groups.google.com/d/optout.
>
>
>
> --
> Greg DeKoenigsberg
> Ansible Community Guy
>
> Find out why SD Times named Ansible
> their #1 Company to Watch in 2015:
> http://sdtimes.com/companies-watch-2015/
>
> --
> 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/CAM1FbhF9y2yrgdtNAzycRyQT6V6NGcZ%2B%2B0%3DzyfLbpYyQq9si%3DA%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/CANsNpUTm8R%3DMbo%2BLcH02eKqzC%2BnK1TNu4KQqn7NUN_1NjqGABA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] accelerate mode and custom python interpreter (virtualenv)

2015-09-02 Thread knacktus
Hi guys,

unfortunately I'm on REHL6 without the option to install python packages 
for the standard python installation. Thus I'm using Ansible from an 
virtualenv on the managing node. That works fine, except that now I'm 
running into performance issues.

The virtualenv sits on a nfs share which is mounted to all nodes. Thus it 
is available on all nodes.

python-keyczar is installed in the virtualenv and seems to work. At least 
the following command runs from within the virtualenv

keyczart create --location=~/temp --purpose=crypt

Now I've created a wrapper script for the custom python interpreter (/home/
test/PythonVirtualEnv/pyenv
):

#!/bin/tcsh

source /home/ft2vwaa/PythonVirtualEnv/AnsibleEnv2/bin/activate.csh

python $argv[1]


and I can use it as custom interpreter, e.g.:

- hosts: logstash
  name: Source virtual env
  remote_user: "{{ test_remote_user }}"
  vars:
ansible_python_interpreter: /home/test/PythonVirtualEnv/pyenv
  tasks:
  - name: check
shell: echo $VIRTUAL_ENV
register: out
  - debug: var=out.stdout_lines 

This prints out the virtualenv as expected. So it is actually loaded.

But adding the accelerate mode directive results in an error.

- hosts: logstash
  name: Source virtual env
  remote_user: "{{ ipf_remote_user }}"
  accelerate: true
  vars:
ansible_python_interpreter: /home/ft2vwaa/PythonVirtualEnv/pyenv
  tasks:
  - name: check
shell: echo $VIRTUAL_ENV
register: out
  - debug: var=out.stdout_lines 


GATHERING FACTS 
***
fatal: [server_01] => Failed to launch the accelerated daemon on server_01 (
reason: keyczar is not installed (on the remote side))
fatal: [server_02] => Failed to launch the accelerated daemon on server_02 (
reason: keyczar is not installed (on the remote side))


Any ideas or suggestions are highly welcome.

Cheers,

Jan



-- 
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/9e6dc9bf-37c2-400b-bbc0-b5e4770869aa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.