[ansible-project] git module always sets '--remote' for submodule updates

2014-07-21 Thread Michel Blanc
Hi, I'm sending a probe here to see if I got this right before opening an issue. When a git project is checked out using ansible, submodules are always updated with the '--remote' option. https://github.com/ansible/ansible/blob/devel/library/source_control/git#L432 Here is the relevant piece

Re: [ansible-project] Possible to set Serial per task ( needed when using delegate_to ) ?

2014-07-21 Thread Guillaume Subiron
Here is another example : - name: Fetch public ssh key command: cat /root/.ssh/id_rsa.pub register: root_pub_key - name: Add public ssh key to backup account delegate_to: {{ backup_server }} authorized_key: user={{ hostvars[backup_server]['backup_user'] }}

Re: [ansible-project] ssh failure reporting between paramiko and ssh

2014-07-21 Thread Jordi Monfar
For this I don't even need ansible: I can run ssh directly with as many -vvv... flags to the failing node to debug why it fails. If ssh works but ansible fails, then - ansible flags help, admitted. Except that ansible - flags provide information only if there is some minimal

Re: [ansible-project] Re: Starting Openstack VMs in parallel

2014-07-21 Thread Bob Tiernay
Hi Tony, Does this example do what you want? https://github.com/ostack/ansible-example/blob/d7849bf464399e5078a1fe7d79002a8710293fa8/playbooks/deploy.yaml It basically starts with the add_hosts and then uses that as the basis for executing nova_compute, etc. It is set to be serial in this

Re: [ansible-project] Ansible managing Ansible

2014-07-21 Thread Michael DeHaan
For Tower questions, please ask supp...@ansible.com, this list is for the open source project only. Using Ansible as a monitoring system does strike me as inappropriate usage. On Sun, Jul 20, 2014 at 11:08 PM, Jason Edelman jedelm...@gmail.com wrote: I'm thinking of running Ansible on every

Re: [ansible-project] git module always sets '--remote' for submodule updates

2014-07-21 Thread Michael DeHaan
There are several tickets already open on the git module. Bugfix submissions (pull requests) would be great, but I'd avoid opening up an extra ticket on the same subject. https://github.com/ansible/ansible/search?q=gitref=cmdformtype=Issues On Mon, Jul 21, 2014 at 5:41 AM, Michel Blanc

Re: [ansible-project] S3 Bucket creation - IAM

2014-07-21 Thread Michael DeHaan
We already have modules for S3. If you are missing something for IAM with S3, we'd likely just want to revise the existing module. On Sun, Jul 20, 2014 at 1:28 PM, Brian Dunbar brian.dun...@gmail.com wrote: I may need to provision and manage S3 buckets for clients, and set IAM policies for

Re: [ansible-project] Possible to set Serial per task ( needed when using delegate_to ) ?

2014-07-21 Thread Michael DeHaan
There's no current way to add serial to a task right now, nor is that the proper keyword for this. I think this would be proposing an override for forks as a task attribute. On Mon, Jul 21, 2014 at 6:11 AM, Guillaume Subiron maet...@subiron.org wrote: Here is another example : - name:

[ansible-project] Help in expressing a task in ansible

2014-07-21 Thread Raghu Udiyar
Hello, I have the following task for user management, that I'm trying to express in ansible : User data is in a *users* key (vars/users.yml) Host group data is in a *host_groups* keys ( vars/groups.yml) The users key contains the list of users and their data, e.g. : users: - name: test

Re: [ansible-project] Re: Starting Openstack VMs in parallel

2014-07-21 Thread Kurt Yoder
At the moment my code is bound up in a playbook that I can't share. Sorry. On Sunday, July 20, 2014 8:03:05 PM UTC-4, Bob Tiernay wrote: Hey Kurt, Do you happen to have a full example in a repo somewhere? I would be very interested to check it out. Thanks in advance, Bob On Thursday,

Re: [ansible-project] implementing hashes

2014-07-21 Thread Brandon Metcalf
Thanks, Michael. I was able to get something like that working. However, what I ultimately need is the ability to control the order in which app1 and app2 are operated on within certain tasks. For some tasks, I need to operate on app1 first and for others app2 first. On Sat, Jul 19, 2014 at

Re: [ansible-project] Possible to set Serial per task ( needed when using delegate_to ) ?

2014-07-21 Thread Michael DeHaan
Just as a quick update, this has actually nothing to do with thread safety. Ansible, in fact, even locally does not use threads - it uses forks. Remotely, it's more of an issue with X is not able to be used concurrently, which is the same thing you'd get if you were running from 2 different

[ansible-project] Ansible 1.6.7 - security release

2014-07-21 Thread James Cammarata
Hi everyone, Today we are updating Ansible to 1.6.7 to upgrade security based on untrusted or hidden inputs. As you remember, we previously made some previous updates based on some security findings from two individuals, in this case, a variation from one of these same folks was shared later by

[ansible-project] Using environment vars for variables

2014-07-21 Thread Tom Hall
I thought - name: Clone repo git: repo={{ git_repo }} dest={{ git_dest }} version={{ git_version | lookup('env','git_version') | default('master') }} notify: reload apache would work to use the git_version group_var, ENV if it was set and master otherwise. I think I was

Re: [ansible-project] Using environment vars for variables

2014-07-21 Thread Brian Coca
On Mon, Jul 21, 2014 at 1:59 PM, Tom Hall thattommyh...@gmail.com wrote: {{ git_version | lookup('env','git_version') | default('master') }} this is not a valid construct, lookup is not a filter. -- Brian Coca Stultorum infinitus est numerus

Re: [ansible-project] Using environment vars for variables

2014-07-21 Thread Brian Coca
version={{ ( lookup('env','git_version')|default(git_version)) | default('master') }} ​ -- 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

Re: [ansible-project] Using environment vars for variables

2014-07-21 Thread Tom Hall
That does not work, msg: Could not determine remote revision for (presumably the lookup returns the empty string?) I dont have git_version set in my group_var's Tom On 21 July 2014 19:36, Brian Coca brianc...@gmail.com wrote: version={{ ( lookup('env','git_version')|default(git_version)) |

Re: [ansible-project] Using environment vars for variables

2014-07-21 Thread Tom Hall
Think that's the case as lookup('env','git_version') | default('master') has the same error. On 21 July 2014 20:39, Tom Hall thattommyh...@gmail.com wrote: That does not work, msg: Could not determine remote revision for (presumably the lookup returns the empty string?) I dont have

Re: [ansible-project] Using environment vars for variables

2014-07-21 Thread Tom Hall
I have a workaround, I can do --extra-vars git_version=HEAD~1 to rollback Tom On 21 July 2014 20:41, Tom Hall thattommyh...@gmail.com wrote: Think that's the case as lookup('env','git_version') | default('master') has the same error. On 21 July 2014 20:39, Tom Hall thattommyh...@gmail.com

[ansible-project] 127.0.0.1 and localhost in synchronize module

2014-07-21 Thread Timothy Appnel
Given the nature of rsync and what it does, your question can be read a few ways but let me guess at what you are getting at. 127.0.0.1 and localhost are treated specially because you're already on that box so you don't need to provide all of the SSH credentials. You can do a sync that

Re: [ansible-project] Can lineinfile take variable as parameters?

2014-07-21 Thread Michael DeHaan
A quick question or to -- what version of Ansible are you trying this on? In your ansible.cfg, is this perhaps an upgrade that does not have fail on undefined variables turned on? Most people have this on now, but not all. It's the default if you don't have an ansible.cfg and your version is

Re: [ansible-project] implementing hashes

2014-07-21 Thread Michael DeHaan
You could still keep the data in the hash and then traverse an array. thing_details[item]['hash_key'] where thing_details is a hash and you're traversing across a with_items: thing_names On Mon, Jul 21, 2014 at 10:14 AM, Brandon Metcalf brandon.metc...@logicmonitor.com wrote: Thanks,

Re: [ansible-project] Can lineinfile take variable as parameters?

2014-07-21 Thread Sean
On Monday, July 21, 2014 4:13:17 PM UTC-7, Michael DeHaan wrote: A quick question or to -- what version of Ansible are you trying this on? In your ansible.cfg, is this perhaps an upgrade that does not have fail on undefined variables turned on? Most people have this on now, but not

[ansible-project] Conditionally using a task parameter if a variable is/is not defined.

2014-07-21 Thread Steven Ringo
Hi, I am running the ec2 module to provision an instance, with variables defined in a vars file, and the action in a role playbook: - name: instance provisioning local_action: module: ec2 region: {{ region }} key_name: {{ key }} id: {{ idempotency_token }}

Re: [ansible-project] Can lineinfile take variable as parameters?

2014-07-21 Thread Sean
Hi all, Just FYI in case that other folks may find this helpful later. I took Michael's hint, and changed the error_on_undefined_vars from False to True, which basically returns an explicit error if there exists a missing variable, as follow. myproject_foler/.ansible.cfg