Re: [ansible-project] Re: Ansible installation from source (git clone) gives "ImportError: No module named ansible.runner"

2015-12-11 Thread P
Ok. Once again repeating steps from the official webpage:

# git clone https://github.com/ansible/ansible.git --recursive
Initialized empty Git repository in /opt/apps/ansible/.git/
remote: Counting objects: 102829, done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 102829 (delta 1), reused 0 (delta 0), pack-reused 102824
Receiving objects: 100% (102829/102829), 36.27 MiB | 7.31 MiB/s, done.
Resolving deltas: 100% (61433/61433), done.
Submodule 'lib/ansible/modules/core' 
(https://github.com/ansible/ansible-modules-core) 
registered for path 'lib/ansible/modules/core'
Submodule 'lib/ansible/modules/extras' 
(https://github.com/ansible/ansible-modules-extras) 
registered for path 'lib/ansible/modules/extras'
Initialized empty Git repository in /opt/apps/ansible/lib/ansible/modules/
core/.git/
remote: Counting objects: 30323, done.
remote: Compressing objects: 100% (12/12), done.
remote: Total 30323 (delta 2), reused 0 (delta 0), pack-reused 30311
Receiving objects: 100% (30323/30323), 8.18 MiB | 4.51 MiB/s, done.
Resolving deltas: 100% (20131/20131), done.
Submodule path 'lib/ansible/modules/core': checked out 
'0d23b3df526875c8fc6edf94268f3aa850ec05f1'
Initialized empty Git repository in /opt/apps/ansible/lib/ansible/modules/
extras/.git/
remote: Counting objects: 28803, done.
remote: Compressing objects: 100% (21/21), done.
remote: Total 28803 (delta 10), reused 0 (delta 0), pack-reused 28782
Receiving objects: 100% (28803/28803), 7.79 MiB | 4.06 MiB/s, done.
Resolving deltas: 100% (19075/19075), done.
Submodule path 'lib/ansible/modules/extras': checked out 
'51813e003331c3341b07c5cda33346cada537a3b'
# cd ansible
# source ./hacking/env-setup
running egg_info
creating lib/ansible.egg-info
writing requirements to lib/ansible.egg-info/requires.txt
writing lib/ansible.egg-info/PKG-INFO
writing top-level names to lib/ansible.egg-info/top_level.txt
writing dependency_links to lib/ansible.egg-info/dependency_links.txt
writing manifest file 'lib/ansible.egg-info/SOURCES.txt'
reading manifest file 'lib/ansible.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'v2'
no previously-included directories found matching 'docsite'
no previously-included directories found matching 'ticket_stubs'
no previously-included directories found matching 'packaging'
no previously-included directories found matching 'test'
no previously-included directories found matching 'hacking'
writing manifest file 'lib/ansible.egg-info/SOURCES.txt'

Setting up Ansible to run out of checkout...

PATH=/opt/apps/ansible/bin:/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/
bin:/sbin:/bin:/usr/sbin:/usr/bin:/opt/IBM/nmon:/root/bin
PYTHONPATH=/opt/apps/ansible/lib/:
MANPATH=/opt/apps/ansible/docs/man:

Remember, you may wish to specify your host file with -i

Done!

# ansible --version
Traceback (most recent call last):
  File "/opt/apps/ansible/bin/ansible", line 39, in 
from ansible.errors import AnsibleError, AnsibleOptionsError, 
AnsibleParserError
ImportError: No module named ansible.errors
# echo $PATH
/opt/apps/ansible/bin:/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:
/sbin:/bin:/usr/sbin:/usr/bin:/opt/IBM/nmon:/root/bin
# echo $PYTHONPATH
/opt/apps/ansible/lib/:


So what is wrong with it ?

-- 
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/72954293-3080-4af1-af5b-92edd22e8b26%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Ansible getting host from multiple groups in role

2015-12-11 Thread Yoshi Spendiff
Hi,

I'm working on creating some provisioning code to create and delete stacks 
in EC2. So far I have four pieces of code which I'm working on

1. An ansible role which creates infrastructure like a VPC and security 
groups
2. An ansible role which creates stack layers, the same code can be run 
multiple times with a layer name to make multiple layers of a stack
3. An ansible role which tears down stack layers, the same code can be run 
multiple times with a layer name to remove a particular layer
4. An ansible role which deletes infrastructure like the VPC and security 
groups

I also am passive a variable to the stack creation called aws_environment 
which I can use to manage multiple stack at once (i.e. have a staging, 
development and production stack as different environment)

1 and 2 were more difficult than I an anticipated but I got working fairly 
well but I'm totally stuck on 3 and need some help.

I'm at a step in the 3rd role where I want to detach instances from the 
load balancer. I need to be able to generate a list of instances in the 
matrix of Environment X Layer, where Environment is passed as a variable to 
ansible-playbook and the layer name is a variable defined as layer_name for 
each call of the delete_layer role.

I need to then use that list to remove the instance from the ELB like so:

*- name: "{{ layer_name }} layer - Detach instance from ELB"*
*  local_action:*
*module: ec2_elb*
*state: absent*
*region: "{{ aws_region }}"*
*instance_id: "{{ item.id }}" <-- HOW DO I GET THIS*
*ec2_elbs: "{{ layer_name }}" <-- The ELB for the layer is named the 
same as the layer itself*
*  with_items: **STUCK***
*  when: attach_elb == True*

Can I perhaps make a fact that I can then iterate over somehow?

-- 
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/7cbb2874-43dc-46d4-842c-49e92febc7d3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] The async task did not return valid JSON: Extra data ...

2015-12-11 Thread Nuriel Shem-Tov
Hi!

I am running the following playbook:

---
- hosts: all
  remote_user: root
  tasks:

 - name: simulate long running op (15 sec), wait for up to 45 sec, poll 
every 5 sec
command: /bin/sleep 15
async: 45
poll: 5


And it fails:

 
FAILED! => {"changed": false, "failed": true, "msg": "The async task did 
not return valid JSON: Extra data: line 2 column 1 - line 5 column 1 (char 
115 - 244)"}

I am not sure what is going wrong, the playbook example is from 
http://docs.ansible.com/ansible/playbooks_async.html

Ansible version:
ansible 2.1.0 (devel bd0f9a4afc) last updated 2015/12/11 11:05:40 (GMT +000)
  lib/ansible/modules/core: (detached HEAD 0e043f8c58) last updated 2015/11/
26 10:11:24 (GMT +000)
  lib/ansible/modules/extras: (detached HEAD e46e2e1d6f) last updated 2015/
11/26 10:11:27 (GMT +000)
  config file = /home/nuriel.shemtov/.ansible.cfg
  configured module search path = Default w/o overrides


On Ubuntu
3.13.0-62-generic #102~precise1-Ubuntu SMP Wed Aug 12 14:09:54 UTC 2015 
x86_64 x86_64 x86_64 GNU/Linux

Remote host running Centos 5.5 ...

Any help is much appreciated!
Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/c4b39d6c-c638-40df-8abd-8dce106321a3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] How include argument in task if some variable is defined?

2015-12-11 Thread viatoriche
Example: 

- name: Update databases
  postgresql_db:
name={{ name }}
...
login_host={{ login_host }} {% if login_host is defined %}
...

->
 vars: 
login_host: "localhost"

  postgresql_db:
name={{ name }}
login_host={{ login_host }}

or 
  vars: empty

  postgresql_db:
name={{ name }}

-- 
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/e5fa7b98-b973-4684-9bd8-bba99069ca43%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Rework of properties in zfs module

2015-12-11 Thread Johan Wirén
When development of the zfs module started there was no possibility to set 
check_invalid_arguments=False in the argspec and i don't think complex args 
were available either so ALL zfs properties ended up being an ansible 
module option. This is bad because options have different names and 
settings on different OS'es and zpool versions.

I have a reworked version of the zfs module here: 
https://github.com/johanwiren/ansible-modules-extras/commit/e549d967233879981d3639c83d757bafd8274265?diff=unified

My proposal is to skip option checking in the ansible module and pass on 
all options to the zfs command to set/update the properties. This probably 
breaks some guidelines about options being documented, but I don't see a 
better way of doing it.

Comments and thoughts about that?

I did not create a PR for it since I read that module owners get their PRs 
merged automatically, which is not intended in this case :)

/Johan

-- 
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/c63dafac-0c20-42d9-bf79-af72c98b6a30%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Re: Ansible installation from source (git clone) gives "ImportError: No module named ansible.runner"

2015-12-11 Thread Brian Coca
Clone will automatically give you 'devel' which is the 'most current'.
There are verbose options, but they won't workas you are failing on
the basic import before anything gets run.

what does this return?

/usr/bin/env python --version



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


Re: [ansible-project] Re: Ansible installation from source (git clone) gives "ImportError: No module named ansible.runner"

2015-12-11 Thread P
# /usr/bin/env python --version
Python 2.6.6



-- 
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/b70dfd73-db27-41d2-b8ff-f19ea08775df%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Re: Ansible installation from source (git clone) gives "ImportError: No module named ansible.runner"

2015-12-11 Thread Brian Coca
There is something really weird going on, the exact same steps work
fine for me, your pythonpath is correct and should be able to find the
files.

Can you confirm that /opt/apps/ansible/lib/ansible/errors/__init__.py  exists?


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


Re: [ansible-project] Re: Ansible installation from source (git clone) gives "ImportError: No module named ansible.runner"

2015-12-11 Thread P
"Freshly" cloned again today:

# ls -la /opt/apps/ansible/lib/ansible/errors/__init__.py
-rw-r--r-- 1 root root 7738 Dec 11 11:42 /opt/apps/ansible/lib/ansible/
errors/__init__.py

I also don't understand what is going on.
When I clone it it has many releases in it. Don't I need to checkout one of 
them at the very begin ?

Can I turn on some debugging/verbose options ?

-- 
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/6e91d722-67ca-46b9-81a4-8a892606fc0a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: Iterating over a list in a dictionary within a Jinja2 template

2015-12-11 Thread cmacrae
Thanks Mike! I'll take a go at using this :)

On Tuesday, 8 December 2015 15:06:08 UTC, Mike Biancaniello wrote:
>
> First, in your j2, you can't ever reference `item` without `item.key` or 
> `item.value`.
>
> However, I think your amin problem is that your first iteration is a dict 
> (not a list) and the second is a list of dicts without deterministic keys.
>
> Try this:
>
> hubot_bots:
>   testbot:
> owner: 'Bot Wrangler '
> name: Hubot
> descr: Delightfully aware robutt
> adapter: rocketchat
> environment:
>   - key: rocketchat_room
> value: GENERAL
>   - key: rocketchat_user
> value: Hubot
>   - key: rocketchat_password
> value: Hubot
>
>
>
>
> or:
>
> hubot_bots:
>   testbot:
> owner: 'Bot Wrangler '
> name: Hubot
> descr: Delightfully aware robutt
> adapter: rocketchat
> environment:
>   rocketchat_room: GENERAL
>   rocketchat_user: Hubot
>   rocketchat_password: Hubot
>
>
> You could also go with with_items and change the vars to:
>
> hubot_bots:
>   - label: testbot
> owner: 'Bot Wrangler '
> name: Hubot
> descr: Delightfully aware robutt
> adapter: rocketchat
> environment:
>   rocketchat_room: GENERAL
>   rocketchat_user: Hubot
>   rocketchat_password: Hubot
>
>
>
>
>

-- 
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/47fe360d-2807-4cec-83f8-e62bbbed86b8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Reversing changes from ConfigureRemotingForAnsible.ps1 script

2015-12-11 Thread Andre Villegas
For this script, ConfigureRemotingForAnsible.ps1, that automates the setup 
of WinRM on Windows remote nodes, can the changes be easily reversed to 
bring back to "factory" settings?

Thank you!

-- 
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/e638a4e0-bc39-4c86-b51b-977317a085f0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] vsphere_guest: is post-clone configuration on the roadmap?

2015-12-11 Thread Daniel Carl
Hello,

For out test environment we have a need to deploy a large number of Windows 
7 VMs with customer software installed, which we run for a few days and 
destroy before the next build. I have been trying for a little over a week 
now to automate this process as much as possible via Ansible; I am able to 
deploy n clones of a template snapshot with no trouble, but I'm having 
trouble with the post-clone configurations - we need each VM to have a 
unique machine name, and would ideally like to make some other 
modifications that would normally be performed using the Customization 
Specification Manager in the vSphere Web Client, but per the vsphere_guest 
documentation it doesn't seem that is currently possible ('No guest 
customization changes to hardware such as CPU, RAM, NICs or Disks can be 
applied when launching from template.').

Is there a way to perform the customization that I'm missing? If not, is 
that feature on the roadmap for vsphere_guest? I suspect I'm not the only 
one that would find it extremely useful. :)

Thanks,
Daniel Carl

-- 
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/53b61fa0-009d-47ef-b934-b47e393dc6d6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] kerb host princ maintenance

2015-12-11 Thread Mike Biancaniello
Does anyone know of an existing module that allows me to manage krb5 princs 
and keytabs that also supports --check-mode?

I found one that essentially runs a bash script to add princs, but it 
doesn't check first to see if the entry exists (if I remember, it was meant 
for creating the admin for a new install).

I'm about to just write my own, but figured I'd ask here as a last attempt 
to find something that already exists.

-- 
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/c80ca51a-721e-414d-8023-26aca9fbb5be%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] How to make an item in with_items conditional?

2015-12-11 Thread Marc Abramowitz
Take this playbook:

- hosts: mt1-dummys101
  tasks:
- name: Install apt packages
  sudo: true
  apt: pkg={{ item }}
  with_items:
- build-essential
- libyaml-dev
- python2.7-dev
- "{{ 'silversearcher-ag' if ansible_distribution_major_version == 
'14' else '' }}"

How would I make it so that silversearcher-ag is installed only on Ubuntu 
14 and is omitted for other operating systems?

The above gives:

TASK: [Install apt packages] 
**
failed: [mt1-dummys101] => 
(item=build-essential,libyaml-dev,python2.7-dev,) => {"failed": true, 
"item": "build-essential,libyaml-dev,python2.7-dev,"}
msg: No package matching '' is available

I also tried changing the empty string `''` to `omit` but that also fails:

TASK: [Install apt packages] 
**
failed: [mt1-dummys101] => 
(item=build-essential,libyaml-dev,python2.7-dev,__omit_place_holder__07ef1633a8f8d1dc718ffb780b3f0e54d7f7b02a)
 
=> {"failed": true, "item": 
"build-essential,libyaml-dev,python2.7-dev,__omit_place_holder__07ef1633a8f8d1dc718ffb780b3f0e54d7f7b02a"}
msg: No package matching 
'__omit_place_holder__07ef1633a8f8d1dc718ffb780b3f0e54d7f7b02a' is available

Any way to do this?

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/f1257535-d363-48b7-b086-49760204efd0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Re: Ansible installation from source (git clone) gives "ImportError: No module named ansible.runner"

2015-12-11 Thread Brian Coca
have you been cleaning out the dir between 'attempts'?



-- 
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/CAJ5XC8nEd%3DpG74oJxRd%2BnOXL%3DyQtADD4HBDeZiPLAhBfrRJ-%2Bg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: How to make an item in with_items conditional?

2015-12-11 Thread Dylan Martin
I've done it by having two lists in group vars files and doing a group_by

On Friday, December 11, 2015 at 9:11:16 AM UTC-8, Marc Abramowitz wrote:
>
> Take this playbook:
>
> - hosts: mt1-dummys101
>   tasks:
> - name: Install apt packages
>   sudo: true
>   apt: pkg={{ item }}
>   with_items:
> - build-essential
> - libyaml-dev
> - python2.7-dev
> - "{{ 'silversearcher-ag' if ansible_distribution_major_version == 
> '14' else '' }}"
>
> How would I make it so that silversearcher-ag is installed only on Ubuntu 
> 14 and is omitted for other operating systems?
>
> The above gives:
>
> TASK: [Install apt packages] 
> **
> failed: [mt1-dummys101] => 
> (item=build-essential,libyaml-dev,python2.7-dev,) => {"failed": true, 
> "item": "build-essential,libyaml-dev,python2.7-dev,"}
> msg: No package matching '' is available
>
> I also tried changing the empty string `''` to `omit` but that also fails:
>
> TASK: [Install apt packages] 
> **
> failed: [mt1-dummys101] => 
> (item=build-essential,libyaml-dev,python2.7-dev,__omit_place_holder__07ef1633a8f8d1dc718ffb780b3f0e54d7f7b02a)
>  
> => {"failed": true, "item": 
> "build-essential,libyaml-dev,python2.7-dev,__omit_place_holder__07ef1633a8f8d1dc718ffb780b3f0e54d7f7b02a"}
> msg: No package matching 
> '__omit_place_holder__07ef1633a8f8d1dc718ffb780b3f0e54d7f7b02a' is available
>
> Any way to do this?
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/771578e8-a31c-44fa-82b7-70077a19a77d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: core.cloud.openstack Error Fetching Image List

2015-12-11 Thread David Shrewsbury
What version of python-glanceclient and requests do you have installed?



On Thursday, December 10, 2015 at 2:08:47 PM UTC-5, Hugh Ma wrote:
>
> This is from the inventory script. Everything is fine until it hits glance 
> to pull the image object.
>
> Couldn't construct image object
> Traceback (most recent call last):
>   File "/usr/local/lib/python2.7/dist-packages/shade/openstackcloud.py", 
> line 254, in _get_client
> **kwargs)
>   File 
> "/usr/local/lib/python2.7/dist-packages/os_client_config/cloud_config.py", 
> line 300, in get_legacy_client
> return client_class(*constructor_args, **constructor_kwargs)
>   File "/usr/local/lib/python2.7/dist-packages/glanceclient/client.py", 
> line 59, in Client
> module = utils.import_versioned_module(int(version), 'client')
>   File 
> "/usr/local/lib/python2.7/dist-packages/glanceclient/common/utils.py", line 
> 281, in import_versioned_module
> return importutils.import_module(module)
>   File "/usr/local/lib/python2.7/dist-packages/oslo_utils/importutils.py", 
> line 73, in import_module
> __import__(import_str)
>   File 
> "/usr/local/lib/python2.7/dist-packages/glanceclient/v2/__init__.py", line 
> 15, in 
> from glanceclient.v2.client import Client  # noqa
>   File "/usr/local/lib/python2.7/dist-packages/glanceclient/v2/client.py", 
> line 17, in 
> from glanceclient.common import http
>   File 
> "/usr/local/lib/python2.7/dist-packages/glanceclient/common/http.py", line 
> 26, in 
> ProtocolError = requests.packages.urllib3.exceptions.ProtocolError
> AttributeError: 'module' object has no attribute 'packages'
> Error fetching image list: 'module' object has no attribute 'packages'
>

-- 
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/eb28fb22-6147-4062-9736-b91fd03acc22%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Re: Ansible installation from source (git clone) gives "ImportError: No module named ansible.runner"

2015-12-11 Thread P
Which dir ? /opt/apps/ansible ?
I remove it entirely and clone it again.

On Friday, December 11, 2015 at 3:05:32 PM UTC, Brian Coca wrote:
>
> have you been cleaning out the dir between 'attempts'? 
>
>
>
> -- 
> 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/1d08d140-6dc7-4ab7-b916-cd3959ffb533%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Raw module and interactive commands

2015-12-11 Thread theyuseus
Awesome, thank you for the information.

-- 
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/c3601104-2b2c-43d7-a905-86d317a68da4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Playbook templating done before loading group_vars contents?

2015-12-11 Thread Alexandr Kurilin
Great, makes sense, thank you.

On Fri, Dec 11, 2015 at 2:58 PM, Matt Martz  wrote:

> group_vars are applied to individual hosts and is not available globally
> without a host context.  To use a variable for hosts it must be global
> and provided before parsing the play.  Such as providing it via
> --extra-vars on the command line.
>
>
> On Friday, December 11, 2015, Alexandr Kurilin 
> wrote:
>
>> Hey folks,
>>
>> Ansible 1.9.2 here. I've been recently working on moving us over from
>> static inventories to using the ec2 script. One constraint I have is that I
>> separate different environments within the same AWS account by the
>> Environment tag. In this case I'm working on Environment=dev, which in my
>> file tree has its own folder (see tree at the bottom). The problem I'm
>> having is that I can't figure out how to set {{ env }} in my *- hosts:*
>> from my all.yml file in group_vars. It looks like group_vars as NOT read at
>> the time of the playbook yml file templating, but only afterwards. As an
>> example, assuming this all.yml:
>>
>> ---
>>
>> env: dev
>>
>> and this foo.yml:
>>
>> ---
>>
>> - hosts: "{{ 'tag_Role_utilities:_Environment_' + env }}"
>>   tasks:
>> - debug: var=env
>>
>> this playbook will not work:
>>
>> ansible-playbook -i inventories/dev/ec2.py foo.yml
>>
>> PLAY [{{ 'tag_Role_utilities:_Environment_' + env }}]
>> *
>> skipping: no hosts matched
>>
>> but if I pass the env variable as --extra-vars, then it will:
>>
>> ansible-playbook -i inventories/dev/ec2.py foo.yml --extra-vars="env=dev"
>>
>> PLAY [tag_Role_utilities:_Environment_dev]
>> 
>>
>> GATHERING FACTS
>> ***
>> ok: [172.31.57.124]
>>
>> TASK: [debug var=env]
>> *
>> ok: [172.31.57.124] => {
>> "var": {
>> "env": "dev"
>> }
>> }
>>
>> PLAY RECAP
>> 
>> 172.31.57.124  : ok=2changed=0unreachable=0
>>  failed=0
>>
>>
>> Note that here the value of "env" in the debug module is actually
>> correctly populated from the all.yml group_vars file. e.g. if I rename that
>> var name in both the debug module and all.yml to something like
>> inventory_env, it will get the value correctly.
>>
>> Is this by design? Is there no way for me to template the tags in *-
>> host:* without using an --extra-vars? Any way I can use group_vars for
>> playbook templating? It would save me the need to write my own wrapper
>> script around ansible that would set --extra-vars for me for each separate
>> environment I have.
>>
>> My inventories/dev tree structure is as follows:
>>
>> dev
>> ├── ec2.ini
>> ├── ec2.py
>> ├── group_vars
>> │   ├── all
>> │   │   ├── all.yml
>> │   │   └── secrets.yml
>> │   ├── apps
>> │   └── utils
>> └── hosts
>>
>>
>> Thank you.
>>
>> --
>> 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/b76bb9ce-174f-440e-8ddb-e56773555f4d%40googlegroups.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
> --
> Matt Martz
> @sivel
> sivel.net
>
> --
> 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/tQTAsp_OA_w/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/CAD8N0v-KWQqH0zHsa7SPjd4Phfqr5zBCAU-xGx3X2t_1kkVjkg%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 

Re: [ansible-project] Re: How to make an item in with_items conditional?

2015-12-11 Thread Marc Abramowitz
Ah, that's clever. Probably too clever for me to want to use on my 
colleagues, but clever nonetheless.

That could be an example if anyone ever writes a book called the "The 
Little Ansibler" in the style of "The Little Schemer". :-)

-- 
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/caa9d0bf-8a8c-48a0-82e3-38d0c9f13fde%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Raw module and interactive commands

2015-12-11 Thread Brian Coca
In 2.0 we have module_utils/ssh.py (to be renamed) that is the core of
shared code for future  modules that will deal with that kind of switch.
On Dec 11, 2015 16:37,  wrote:

> Awesome, thank you for the information.
>
> --
> 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/c3601104-2b2c-43d7-a905-86d317a68da4%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/CAJ5XC8kQOQ7G%2BQGf8%2BmmJKqLqb4osX%2BbMxPmpQoLDc7pEV5fTg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Playbook templating done before loading group_vars contents?

2015-12-11 Thread Matt Martz
group_vars are applied to individual hosts and is not available globally
without a host context.  To use a variable for hosts it must be global and
provided before parsing the play.  Such as providing it via --extra-vars on
the command line.

On Friday, December 11, 2015, Alexandr Kurilin  wrote:

> Hey folks,
>
> Ansible 1.9.2 here. I've been recently working on moving us over from
> static inventories to using the ec2 script. One constraint I have is that I
> separate different environments within the same AWS account by the
> Environment tag. In this case I'm working on Environment=dev, which in my
> file tree has its own folder (see tree at the bottom). The problem I'm
> having is that I can't figure out how to set {{ env }} in my *- hosts:*
> from my all.yml file in group_vars. It looks like group_vars as NOT read at
> the time of the playbook yml file templating, but only afterwards. As an
> example, assuming this all.yml:
>
> ---
>
> env: dev
>
> and this foo.yml:
>
> ---
>
> - hosts: "{{ 'tag_Role_utilities:_Environment_' + env }}"
>   tasks:
> - debug: var=env
>
> this playbook will not work:
>
> ansible-playbook -i inventories/dev/ec2.py foo.yml
>
> PLAY [{{ 'tag_Role_utilities:_Environment_' + env }}]
> *
> skipping: no hosts matched
>
> but if I pass the env variable as --extra-vars, then it will:
>
> ansible-playbook -i inventories/dev/ec2.py foo.yml --extra-vars="env=dev"
>
> PLAY [tag_Role_utilities:_Environment_dev]
> 
>
> GATHERING FACTS
> ***
> ok: [172.31.57.124]
>
> TASK: [debug var=env]
> *
> ok: [172.31.57.124] => {
> "var": {
> "env": "dev"
> }
> }
>
> PLAY RECAP
> 
> 172.31.57.124  : ok=2changed=0unreachable=0failed=0
>
>
> Note that here the value of "env" in the debug module is actually
> correctly populated from the all.yml group_vars file. e.g. if I rename that
> var name in both the debug module and all.yml to something like
> inventory_env, it will get the value correctly.
>
> Is this by design? Is there no way for me to template the tags in *-
> host:* without using an --extra-vars? Any way I can use group_vars for
> playbook templating? It would save me the need to write my own wrapper
> script around ansible that would set --extra-vars for me for each separate
> environment I have.
>
> My inventories/dev tree structure is as follows:
>
> dev
> ├── ec2.ini
> ├── ec2.py
> ├── group_vars
> │   ├── all
> │   │   ├── all.yml
> │   │   └── secrets.yml
> │   ├── apps
> │   └── utils
> └── hosts
>
>
> Thank you.
>
> --
> 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/b76bb9ce-174f-440e-8ddb-e56773555f4d%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 
Matt Martz
@sivel
sivel.net

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


[ansible-project] Re: Ansible getting host from multiple groups in role

2015-12-11 Thread Yoshi Spendiff
My solution so far is to run the play against all nodes and then filter 
using a when statement against the resources I want to affect.

e.g.

- name: "{{ layer_name }} layer - Detach instance from ELB"
  local_action:
module: ec2_elb
state: absent
# Having to specify credentials is a bug 
https://github.com/ansible/ansible/issues/9984
aws_access_key: "{{ lookup('env', 'AWS_ACCESS_KEY_ID') }}"
aws_secret_key: "{{ lookup('env', 'AWS_SECRET_ACCESS_KEY') }}"
region: "{{ aws_region }}"
instance_id: "{{ ansible_ec2_instance_id }}"
ec2_elbs: "{{ layer_name }}"
  when:
attach_elb == True and
hostvars[inventory_hostname].ec2_tag_Environment == aws_environment and
hostvars[inventory_hostname].ec2_tag_Layer == layer_name

Messy but it works

For anyone that stumbles across this in the future I also found running the 
ec2_facts module against the nodes useful to see what facts are available 
(which is where ansible_ec2_instance_id comes from)

On Friday, December 11, 2015 at 6:10:07 AM UTC-8, Yoshi Spendiff wrote:
>
> Hi,
>
> I'm working on creating some provisioning code to create and delete stacks 
> in EC2. So far I have four pieces of code which I'm working on
>
> 1. An ansible role which creates infrastructure like a VPC and security 
> groups
> 2. An ansible role which creates stack layers, the same code can be run 
> multiple times with a layer name to make multiple layers of a stack
> 3. An ansible role which tears down stack layers, the same code can be run 
> multiple times with a layer name to remove a particular layer
> 4. An ansible role which deletes infrastructure like the VPC and security 
> groups
>
> I also am passive a variable to the stack creation called aws_environment 
> which I can use to manage multiple stack at once (i.e. have a staging, 
> development and production stack as different environment)
>
> 1 and 2 were more difficult than I an anticipated but I got working fairly 
> well but I'm totally stuck on 3 and need some help.
>
> I'm at a step in the 3rd role where I want to detach instances from the 
> load balancer. I need to be able to generate a list of instances in the 
> matrix of Environment X Layer, where Environment is passed as a variable to 
> ansible-playbook and the layer name is a variable defined as layer_name for 
> each call of the delete_layer role.
>
> I need to then use that list to remove the instance from the ELB like so:
>
> *- name: "{{ layer_name }} layer - Detach instance from ELB"*
> *  local_action:*
> *module: ec2_elb*
> *state: absent*
> *region: "{{ aws_region }}"*
> *instance_id: "{{ item.id  }}" <-- HOW DO I GET THIS*
> *ec2_elbs: "{{ layer_name }}" <-- The ELB for the layer is named the 
> same as the layer itself*
> *  with_items: **STUCK***
> *  when: attach_elb == True*
>
> Can I perhaps make a fact that I can then iterate over somehow?
>

-- 
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/6a7f5bd4-f411-417c-8d59-91629e1bee15%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Playbook templating done before loading group_vars contents?

2015-12-11 Thread Alexandr Kurilin
Hey folks,

Ansible 1.9.2 here. I've been recently working on moving us over from 
static inventories to using the ec2 script. One constraint I have is that I 
separate different environments within the same AWS account by the 
Environment tag. In this case I'm working on Environment=dev, which in my 
file tree has its own folder (see tree at the bottom). The problem I'm 
having is that I can't figure out how to set {{ env }} in my *- hosts:* 
from my all.yml file in group_vars. It looks like group_vars as NOT read at 
the time of the playbook yml file templating, but only afterwards. As an 
example, assuming this all.yml:

---

env: dev

and this foo.yml:

---

- hosts: "{{ 'tag_Role_utilities:_Environment_' + env }}"
  tasks:
- debug: var=env

this playbook will not work:

ansible-playbook -i inventories/dev/ec2.py foo.yml

PLAY [{{ 'tag_Role_utilities:_Environment_' + env }}] 
*
skipping: no hosts matched

but if I pass the env variable as --extra-vars, then it will:

ansible-playbook -i inventories/dev/ec2.py foo.yml --extra-vars="env=dev"

PLAY [tag_Role_utilities:_Environment_dev] 


GATHERING FACTS 
***
ok: [172.31.57.124]

TASK: [debug var=env] 
*
ok: [172.31.57.124] => {
"var": {
"env": "dev"
}
}

PLAY RECAP 

172.31.57.124  : ok=2changed=0unreachable=0failed=0


Note that here the value of "env" in the debug module is actually correctly 
populated from the all.yml group_vars file. e.g. if I rename that var name 
in both the debug module and all.yml to something like inventory_env, it 
will get the value correctly.

Is this by design? Is there no way for me to template the tags in *- host:* 
without using an --extra-vars? Any way I can use group_vars for playbook 
templating? It would save me the need to write my own wrapper script around 
ansible that would set --extra-vars for me for each separate environment I 
have.

My inventories/dev tree structure is as follows:

dev
├── ec2.ini
├── ec2.py
├── group_vars
│   ├── all
│   │   ├── all.yml
│   │   └── secrets.yml
│   ├── apps
│   └── utils
└── hosts


Thank you.

-- 
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/b76bb9ce-174f-440e-8ddb-e56773555f4d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Management of multiple exclusive authorized_keys entries, for multiple users

2015-12-11 Thread cmacrae
Hi everyone.

I've been mulling something over in my head, I've got something I want to 
tackle, but I'm not sure how to go about doing so.

Here's the scenario: I want to put together a tiny role that manages user's 
authorized keys. Keys defined in the inventory 
(host_vars/group_vars/playbook vars, etc.) should be the only ones present 
in the user's authorized_keys file.

I have some keys specified like so:

root_ssh_public_keys:
  member1:
pubkey: ssh-rsa 
B3NzaC1yc2EBIwAAAQEAvVO3ULx8fNGgInHCFQV6w/gEARBWyS9eA1qRaTEu4njawEjiqSGFHgPuvmgtKlft2MqbnCG3cokFKRAEOZEzy+jUMES8IQEHuSsJuZFnlUC4yzm1mI1OjJk9PwTLDD6OGJDL1gIkz37CYITbsaufS6gFrpoMBZhkVcVKk0JBnmwF/QZUD1uHKFLMtyVwvw8pzWcBcAYBBw5O6hjo2pRIX100bCdMxDrXwFp4yFiJPG6LCya4701whZpqgwk3d/RakJdZLA3pgAlVPZswz8ezj2U5PIYJl+LrUaPE57ZR/eVwNnBE7QPsKCCurIy1bLR0KXiqOmUzdzWDphYCelRurQ==
 member1
  member2:
pubkey: ssh-rsa 
B3NzaC1yc2EBIwAAAQEAtkScC/o1aDxaXFJdyTMhlF4UewNO/tdQf6EIYJzikSBNKECBjmvrM6bNaIkWA/AzB2dgTS0mug2aVomsBeyN8gAGfV/Wi3bO1kXuI23BmkPUn36OgE5ppQ0O2Gp8VjJaffV9EiYeEY/QlwnshAS9gfDPeTO+u5f0ZP0TZw29m+F3CKIJWPruDJJvXMkyc5qokh5kUpm0qYlhGyDi596st3Gsh/9LF/I2sEJH3LTP0gs0bWjbHN9XcIw8gbPT50zNZvqv9FGvgsMCErYC5lwPVN1670cpOpqLYV4PgU77t751CE9RsmASeB6Elwh0pAKlfxzITBx4W6aVxkl8Utlblw==
 member2
  member3:
pubkey: ssh-rsa 
B3NzaC1yc2EBIwAAAQEA2nyE+baFvebdFqiuEEjGYtLHxgduypfBg1laG8DP9Re0ln0lIJRsTw2HoB1giKRpkLXUdYkS+QVkzP0oZCNRZWuEgIuJnL8vl6c0S53UaFTNbZliIuSQLSPsEbQfIu1lQ9voZG2pwJQTj4yICnr29dSPs6ef4n8pox7hhDZSf6LBrrWWc51WYrZwXCSeDstqq53goCKLeujSZ6Ww3T7Ac17OzyhIQCl0x1w8LlcMshaczPKbFLxgLltIF8OmX9PLHuX0enFOVGKyRW66MIIyHuK65gxY/+8mjrzTw9aWOiQVvYZsjuzqBIBQy4h85ex8wF0xztR50D2ylvrbXSNl2w==
 member3


Currently, I have this task that deploys them and ensures they're the only 
keys in the root user's authorized_keys list:

  - name: "Ensure team pubkeys are in root's authorized_keys"
authorized_key:
  user: root
  manage_dir: yes
  exclusive: yes
  key: |
{% for _, user in root_ssh_public_keys.items()%}
{% for _, key in user.items() %}
{{ key }}
{% endfor %}
{% endfor %}
tags: ssh_keys

Now, what I want to be able to do is chuck this into a little role, and 
have it be usable for any user definitions.
So, say I had a system with the user 'example' on, and I wanted to specify 
some keys I want that user to have in their authorized_keys list.
I could go to that system's host_vars and add the following:

example_ssh_public_keys:
  someone:
pubkey: ssh-rsa 
B3NzaC1yc2EBIwAAAQEAvVO3ULx8fNGgInHCFQV6w/gEARBWyS9eA1qRaTEu4njawEjiqSGFHgPuvmgtKlft2MqbnCG3cokFKRAEOZEzy+jUMES8IQEHuSsJuZFnlUC4yzm1mI1OjJk9PwTLDD6OGJDL1gIkz37CYITbsaufS6gFrpoMBZhkVcVKk0JBnmwF/QZUD1uHKFLMtyVwvw8pzWcBcAYBBw5O6hjo2pRIX100bCdMxDrXwFp4yFiJPG6LCya4701whZpqgwk3d/RakJdZLA3pgAlVPZswz8ezj2U5PIYJl+LrUaPE57ZR/eVwNnBE7QPsKCCurIy1bLR0KXiqOmUzdzWDphYCelRurQ==
 someone
  someone_else:
pubkey: ssh-rsa 
B3NzaC1yc2EBIwAAAQEAtkScC/o1aDxaXFJdyTMhlF4UewNO/tdQf6EIYJzikSBNKECBjmvrM6bNaIkWA/AzB2dgTS0mug2aVomsBeyN8gAGfV/Wi3bO1kXuI23BmkPUn36OgE5ppQ0O2Gp8VjJaffV9EiYeEY/QlwnshAS9gfDPeTO+u5f0ZP0TZw29m+F3CKIJWPruDJJvXMkyc5qokh5kUpm0qYlhGyDi596st3Gsh/9LF/I2sEJH3LTP0gs0bWjbHN9XcIw8gbPT50zNZvqv9FGvgsMCErYC5lwPVN1670cpOpqLYV4PgU77t751CE9RsmASeB6Elwh0pAKlfxzITBx4W6aVxkl8Utlblw==
 someone_else  


Notice the variable name is 'example_ssh_public_keys'.
In my task above, I need a way of dynamically defining both the 'user' 
parameter value (shown above as 'root') and the dictionary I'm operating on 
(shown above as 'root_ssh_public_keys').

My point being I need this to be re-usable for different users.

Am I going about this in a really stupid manner? What would be the best way 
to approach this?

Thanks in advance for any help!

-- 
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/84e4429a-c376-42fc-a477-4b2f05b36722%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: Management of multiple exclusive authorized_keys entries, for multiple users

2015-12-11 Thread Dylan Martin
Right of the top of my head, put user specific stuff in a dict in  vars 
file (or conditional include a file for each user), so you have a dict 
that's populated differently based on the value of a "user" var.

Then in a dependencies section in a meta/main.yaml, you just do
{ role: sshrolename, user: username }
{ role: sshrolename. user: otherusername }

Of course that's gonna be slow, so you could write your role to want a list 
of users, and then pass a list in the meta/main.yaml file.  You can always 
pass a list with one item.

On Friday, December 11, 2015 at 7:11:27 AM UTC-8, cmacrae wrote:
>
> Hi everyone.
>
> I've been mulling something over in my head, I've got something I want to 
> tackle, but I'm not sure how to go about doing so.
>
> Here's the scenario: I want to put together a tiny role that manages 
> user's authorized keys. Keys defined in the inventory 
> (host_vars/group_vars/playbook vars, etc.) should be the only ones present 
> in the user's authorized_keys file.
>
> I have some keys specified like so:
>
> root_ssh_public_keys:
>   member1:
> pubkey: ssh-rsa 
> B3NzaC1yc2EBIwAAAQEAvVO3ULx8fNGgInHCFQV6w/gEARBWyS9eA1qRaTEu4njawEjiqSGFHgPuvmgtKlft2MqbnCG3cokFKRAEOZEzy+jUMES8IQEHuSsJuZFnlUC4yzm1mI1OjJk9PwTLDD6OGJDL1gIkz37CYITbsaufS6gFrpoMBZhkVcVKk0JBnmwF/QZUD1uHKFLMtyVwvw8pzWcBcAYBBw5O6hjo2pRIX100bCdMxDrXwFp4yFiJPG6LCya4701whZpqgwk3d/RakJdZLA3pgAlVPZswz8ezj2U5PIYJl+LrUaPE57ZR/eVwNnBE7QPsKCCurIy1bLR0KXiqOmUzdzWDphYCelRurQ==
>  member1
>   member2:
> pubkey: ssh-rsa 
> B3NzaC1yc2EBIwAAAQEAtkScC/o1aDxaXFJdyTMhlF4UewNO/tdQf6EIYJzikSBNKECBjmvrM6bNaIkWA/AzB2dgTS0mug2aVomsBeyN8gAGfV/Wi3bO1kXuI23BmkPUn36OgE5ppQ0O2Gp8VjJaffV9EiYeEY/QlwnshAS9gfDPeTO+u5f0ZP0TZw29m+F3CKIJWPruDJJvXMkyc5qokh5kUpm0qYlhGyDi596st3Gsh/9LF/I2sEJH3LTP0gs0bWjbHN9XcIw8gbPT50zNZvqv9FGvgsMCErYC5lwPVN1670cpOpqLYV4PgU77t751CE9RsmASeB6Elwh0pAKlfxzITBx4W6aVxkl8Utlblw==
>  member2
>   member3:
> pubkey: ssh-rsa 
> B3NzaC1yc2EBIwAAAQEA2nyE+baFvebdFqiuEEjGYtLHxgduypfBg1laG8DP9Re0ln0lIJRsTw2HoB1giKRpkLXUdYkS+QVkzP0oZCNRZWuEgIuJnL8vl6c0S53UaFTNbZliIuSQLSPsEbQfIu1lQ9voZG2pwJQTj4yICnr29dSPs6ef4n8pox7hhDZSf6LBrrWWc51WYrZwXCSeDstqq53goCKLeujSZ6Ww3T7Ac17OzyhIQCl0x1w8LlcMshaczPKbFLxgLltIF8OmX9PLHuX0enFOVGKyRW66MIIyHuK65gxY/+8mjrzTw9aWOiQVvYZsjuzqBIBQy4h85ex8wF0xztR50D2ylvrbXSNl2w==
>  member3
>
>
> Currently, I have this task that deploys them and ensures they're the only 
> keys in the root user's authorized_keys list:
>
>   - name: "Ensure team pubkeys are in root's authorized_keys"
> authorized_key:
>   user: root
>   manage_dir: yes
>   exclusive: yes
>   key: |
> {% for _, user in root_ssh_public_keys.items()%}
> {% for _, key in user.items() %}
> {{ key }}
> {% endfor %}
> {% endfor %}
> tags: ssh_keys
>
> Now, what I want to be able to do is chuck this into a little role, and 
> have it be usable for any user definitions.
> So, say I had a system with the user 'example' on, and I wanted to specify 
> some keys I want that user to have in their authorized_keys list.
> I could go to that system's host_vars and add the following:
>
> example_ssh_public_keys:
>   someone:
> pubkey: ssh-rsa 
> B3NzaC1yc2EBIwAAAQEAvVO3ULx8fNGgInHCFQV6w/gEARBWyS9eA1qRaTEu4njawEjiqSGFHgPuvmgtKlft2MqbnCG3cokFKRAEOZEzy+jUMES8IQEHuSsJuZFnlUC4yzm1mI1OjJk9PwTLDD6OGJDL1gIkz37CYITbsaufS6gFrpoMBZhkVcVKk0JBnmwF/QZUD1uHKFLMtyVwvw8pzWcBcAYBBw5O6hjo2pRIX100bCdMxDrXwFp4yFiJPG6LCya4701whZpqgwk3d/RakJdZLA3pgAlVPZswz8ezj2U5PIYJl+LrUaPE57ZR/eVwNnBE7QPsKCCurIy1bLR0KXiqOmUzdzWDphYCelRurQ==
>  someone
>   someone_else:
> pubkey: ssh-rsa 
> B3NzaC1yc2EBIwAAAQEAtkScC/o1aDxaXFJdyTMhlF4UewNO/tdQf6EIYJzikSBNKECBjmvrM6bNaIkWA/AzB2dgTS0mug2aVomsBeyN8gAGfV/Wi3bO1kXuI23BmkPUn36OgE5ppQ0O2Gp8VjJaffV9EiYeEY/QlwnshAS9gfDPeTO+u5f0ZP0TZw29m+F3CKIJWPruDJJvXMkyc5qokh5kUpm0qYlhGyDi596st3Gsh/9LF/I2sEJH3LTP0gs0bWjbHN9XcIw8gbPT50zNZvqv9FGvgsMCErYC5lwPVN1670cpOpqLYV4PgU77t751CE9RsmASeB6Elwh0pAKlfxzITBx4W6aVxkl8Utlblw==
>  someone_else  
>
>
> Notice the variable name is 'example_ssh_public_keys'.
> In my task above, I need a way of dynamically defining both the 'user' 
> parameter value (shown above as 'root') and the dictionary I'm operating on 
> (shown above as 'root_ssh_public_keys').
>
> My point being I need this to be re-usable for different users.
>
> Am I going about this in a really stupid manner? What would be the best 
> way to approach this?
>
> Thanks in advance for any help!
>

-- 
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/30b3408a-6526-43a0-8188-df1b8ca153cf%40googlegroups.com.
For more options, visit 

[ansible-project] Re: How to make an item in with_items conditional?

2015-12-11 Thread Marc Abramowitz
Yeah, this was what I went with for the time being. I'm curious if there 
are other ways, but this does seem to be a reasonable solution. Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/b16422e8-daf0-482a-8940-8fd27eca2591%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Variables and serial: keyword

2015-12-11 Thread Eugene Zhulkov
I've been struggling with passing variable to serial for the whole day.

All I need is to pass group's length, I've tried 
serial: "{{ groups['appserver']|length }}"

and got a runtime error.

Finally I come up with this code: 
serial: "{{ lookup('group_size', 'appserver') }}"

, where *group_size* is a custom lookup plugin. 

Now I have another problem - how can I get access to inventory instance 
inside lookup plugin? I don't understand API design - all plugins have 
"runner" instance in constructor except LookupModule. 

So my questions are:
- can I parameterize serial?
- can I access inventory inside LookupModule?

Thank you! 

-- 
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/ec93b5ba-fef0-4a8d-b895-3f1b26980168%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Variables and serial: keyword

2015-12-11 Thread Brian Coca
yes
no

parameters to serial cannot depend on inventory as it gets read AFTER
the play is evaluated (serial value is assigned). So use extra vars to
set serial dynamically.


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


[ansible-project] Re: How to make an item in with_items conditional?

2015-12-11 Thread Mike Biancaniello
My first thought is to create a new task and use a when clause:

- hosts: mt1-dummys101
  tasks:
- name: Install apt packages
  sudo: true
  apt: pkg={{ item }}
  with_items:
- build-essential
- libyaml-dev
- python2.7-dev

- name: Install apt packages for version 14

  sudo: true
  apt: pkg={{ item }}
  with_items:- silversearcher-ag
  when: ansible_distribution_major_version == '14'





-- 
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/0ed34123-9271-41e8-b6ba-b99c275323fc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Handy playbook for running given role

2015-12-11 Thread Paul Tötterman
Hi,

This may come in handy at some point:

# vim: set ft=yaml:
# usage: ansible-playbook -e role=somerole role.yml
---
- hosts: all
  roles:
  - '{{role}}'

However, I wasn't able to figure out how to perform the same trick on 
multiple roles:

# vim: set ft=yaml:
# usage: ansible-playbook -e '{"roles": ["role1", "role2"]}' roles.yml
---
- hosts: all
  roles: '{{roles}}'

If anyone has any ideas, please share!

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/f0d2713b-afd8-4574-90b2-43679fb3dad0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Management of multiple exclusive authorized_keys entries, for multiple users

2015-12-11 Thread Daniel Nägele
Hi,

I am using the assemble module, like this:

```yaml
- name: ssh keys for root
  assemble: src=. dest=/root/.ssh/authorized_keys owner=root group=root 
mode=0600 remote_src=false
```

This ensures a synced set of SSH keys from a dir in my playbook repo, where all 
stale keys are being removed and all modifications are detected. This makes use 
of the fact that SSH accepts multiple keys in a single file. 

Best regards,
Daniel

On Fri, 11 Dec 2015 07:11:27 -0800 (PST)
cmacrae  wrote:

> Hi everyone.
> 
> I've been mulling something over in my head, I've got something I want to 
> tackle, but I'm not sure how to go about doing so.
> 
> Here's the scenario: I want to put together a tiny role that manages user's 
> authorized keys. Keys defined in the inventory 
> (host_vars/group_vars/playbook vars, etc.) should be the only ones present 
> in the user's authorized_keys file.
> 
> I have some keys specified like so:
> 
> root_ssh_public_keys:
>   member1:
> pubkey: ssh-rsa 
> B3NzaC1yc2EBIwAAAQEAvVO3ULx8fNGgInHCFQV6w/gEARBWyS9eA1qRaTEu4njawEjiqSGFHgPuvmgtKlft2MqbnCG3cokFKRAEOZEzy+jUMES8IQEHuSsJuZFnlUC4yzm1mI1OjJk9PwTLDD6OGJDL1gIkz37CYITbsaufS6gFrpoMBZhkVcVKk0JBnmwF/QZUD1uHKFLMtyVwvw8pzWcBcAYBBw5O6hjo2pRIX100bCdMxDrXwFp4yFiJPG6LCya4701whZpqgwk3d/RakJdZLA3pgAlVPZswz8ezj2U5PIYJl+LrUaPE57ZR/eVwNnBE7QPsKCCurIy1bLR0KXiqOmUzdzWDphYCelRurQ==
>  member1
>   member2:
> pubkey: ssh-rsa 
> B3NzaC1yc2EBIwAAAQEAtkScC/o1aDxaXFJdyTMhlF4UewNO/tdQf6EIYJzikSBNKECBjmvrM6bNaIkWA/AzB2dgTS0mug2aVomsBeyN8gAGfV/Wi3bO1kXuI23BmkPUn36OgE5ppQ0O2Gp8VjJaffV9EiYeEY/QlwnshAS9gfDPeTO+u5f0ZP0TZw29m+F3CKIJWPruDJJvXMkyc5qokh5kUpm0qYlhGyDi596st3Gsh/9LF/I2sEJH3LTP0gs0bWjbHN9XcIw8gbPT50zNZvqv9FGvgsMCErYC5lwPVN1670cpOpqLYV4PgU77t751CE9RsmASeB6Elwh0pAKlfxzITBx4W6aVxkl8Utlblw==
>  member2
>   member3:
> pubkey: ssh-rsa 
> B3NzaC1yc2EBIwAAAQEA2nyE+baFvebdFqiuEEjGYtLHxgduypfBg1laG8DP9Re0ln0lIJRsTw2HoB1giKRpkLXUdYkS+QVkzP0oZCNRZWuEgIuJnL8vl6c0S53UaFTNbZliIuSQLSPsEbQfIu1lQ9voZG2pwJQTj4yICnr29dSPs6ef4n8pox7hhDZSf6LBrrWWc51WYrZwXCSeDstqq53goCKLeujSZ6Ww3T7Ac17OzyhIQCl0x1w8LlcMshaczPKbFLxgLltIF8OmX9PLHuX0enFOVGKyRW66MIIyHuK65gxY/+8mjrzTw9aWOiQVvYZsjuzqBIBQy4h85ex8wF0xztR50D2ylvrbXSNl2w==
>  member3
> 
> 
> Currently, I have this task that deploys them and ensures they're the only 
> keys in the root user's authorized_keys list:
> 
>   - name: "Ensure team pubkeys are in root's authorized_keys"
> authorized_key:
>   user: root
>   manage_dir: yes
>   exclusive: yes
>   key: |
> {% for _, user in root_ssh_public_keys.items()%}
> {% for _, key in user.items() %}
> {{ key }}
> {% endfor %}
> {% endfor %}
> tags: ssh_keys
> 
> Now, what I want to be able to do is chuck this into a little role, and 
> have it be usable for any user definitions.
> So, say I had a system with the user 'example' on, and I wanted to specify 
> some keys I want that user to have in their authorized_keys list.
> I could go to that system's host_vars and add the following:
> 
> example_ssh_public_keys:
>   someone:
> pubkey: ssh-rsa 
> B3NzaC1yc2EBIwAAAQEAvVO3ULx8fNGgInHCFQV6w/gEARBWyS9eA1qRaTEu4njawEjiqSGFHgPuvmgtKlft2MqbnCG3cokFKRAEOZEzy+jUMES8IQEHuSsJuZFnlUC4yzm1mI1OjJk9PwTLDD6OGJDL1gIkz37CYITbsaufS6gFrpoMBZhkVcVKk0JBnmwF/QZUD1uHKFLMtyVwvw8pzWcBcAYBBw5O6hjo2pRIX100bCdMxDrXwFp4yFiJPG6LCya4701whZpqgwk3d/RakJdZLA3pgAlVPZswz8ezj2U5PIYJl+LrUaPE57ZR/eVwNnBE7QPsKCCurIy1bLR0KXiqOmUzdzWDphYCelRurQ==
>  someone
>   someone_else:
> pubkey: ssh-rsa 
> B3NzaC1yc2EBIwAAAQEAtkScC/o1aDxaXFJdyTMhlF4UewNO/tdQf6EIYJzikSBNKECBjmvrM6bNaIkWA/AzB2dgTS0mug2aVomsBeyN8gAGfV/Wi3bO1kXuI23BmkPUn36OgE5ppQ0O2Gp8VjJaffV9EiYeEY/QlwnshAS9gfDPeTO+u5f0ZP0TZw29m+F3CKIJWPruDJJvXMkyc5qokh5kUpm0qYlhGyDi596st3Gsh/9LF/I2sEJH3LTP0gs0bWjbHN9XcIw8gbPT50zNZvqv9FGvgsMCErYC5lwPVN1670cpOpqLYV4PgU77t751CE9RsmASeB6Elwh0pAKlfxzITBx4W6aVxkl8Utlblw==
>  someone_else  
> 
> 
> Notice the variable name is 'example_ssh_public_keys'.
> In my task above, I need a way of dynamically defining both the 'user' 
> parameter value (shown above as 'root') and the dictionary I'm operating on 
> (shown above as 'root_ssh_public_keys').
> 
> My point being I need this to be re-usable for different users.
> 
> Am I going about this in a really stupid manner? What would be the best way 
> to approach this?
> 
> Thanks in advance for any help!
> 
> -- 
> 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/84e4429a-c376-42fc-a477-4b2f05b36722%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message 

Re: [ansible-project] Re: How to make an item in with_items conditional?

2015-12-11 Thread Brian Coca
with_items:
   - "{{ (ansible_distribution_major_version == '14')|ternary(
'silversearcher-ag','' }}"




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


Re: [ansible-project] Re: How to make an item in with_items conditional?

2015-12-11 Thread Marc Abramowitz
Thanks, but that doesn't work.

E.g.: I used this slightly tweaked line:

- "{{ (ansible_distribution_major_version == 
'12')|ternary('silversearcher-ag', '') }}"

and if the condition is not true, then I get:

TASK: [Install apt packages] 
**
failed: [mt1-dummys101] => 
(item=build-essential,libyaml-dev,python2.7-dev,) => {"failed": true, 
"item": "build-essential,libyaml-dev,python2.7-dev,"}
msg: No package matching '' is available

It seems that for this kind of thing to work, there would either need to be:

- a way to tell with_items to not add the item at all (by using "omit" 
perhaps, which doesn't currently work in this context)
- "apt" module would ignore a blank string or other sentinel value like 
"omit".

-- 
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/1491ecf8-2971-4c8b-a0c9-df00e6e32ea5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Re: How to make an item in with_items conditional?

2015-12-11 Thread Marc Abramowitz
And I would think the former would be more preferable as it is more 
generally applicable (would work with all modules).

I think of "with_items" as being analogous to a for loop in most 
programming languages. So I guess that means the feature that I am wishing 
I had here is analogous to a "continue" statement in those same programming 
languages.

-- 
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/2e119868-f370-457d-9652-e5a950e1c89d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Re: How to make an item in with_items conditional?

2015-12-11 Thread Brian Coca
ah, thought you wanted an empty string, misread from your example.

you'll have to use a when condition or dynamically construct the list,
there is no way to have a list item return a 'delete this item', even
None would return an empty element, but still and element.

list:
 - 1
 - 2
  - 

is already a list of 3 items, no value of  can remove the -
in front of it as it is processed by YAML and  is by jinja2,
when its already a 3 element list.

example of dynamic list
with_items: {{"[1,2]|union( condition|ternary(['stuff'], [] ))"}}

it uses union to add elements from either list with 'stuff' or empty
list, which leaves the original 'unchanged'

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