[ansible-project] When running the shell module in a playbook, how to pass a url to the script?

2015-06-04 Thread Emil Kacperski
Hello, If I am running the shell module to run a script and I want to pass a url into the script how would I do this? Can't use a variable because it's not a dict word? For example the script is : echo $url test.output The playbook has a task running : shell echo.sh If I have a

[ansible-project] Launch ec2 instances in multiple availability zones in single play

2015-06-04 Thread Igor Cicimov
Hi all, I've been looking for the best way to achieve what is mentioned in the title of the message but haven't found any. At least not one that will produce a satisfactory result which can be used further down in the same playbook. For example I've been testing the following loop: -

[ansible-project] Re: When running the shell module in a playbook, how to pass a url to the script?

2015-06-04 Thread Шалыгин Константин
As I understart u want something like this? - name: 1 shell: 'date' register: echo0_result - name: 2 shell: 'echo Current date is - {{ echo0_result.stdout }}' register: echo1_result - name: 3 debug: msg='1st result is {{ echo0_result.stdout }}, 2nd is {{ echo1_result.stdout }}' On

[ansible-project] Re: WinRM configuration script error

2015-06-04 Thread Bob Tanner
What does $PSVersionTable return for you? PS $PSVersionTable Name Value - PSVersion 4.0 WSManStackVersion 3.0 SerializationVersion 1.1.0.1 CLRVersion 4.0.30319.34209

Re: [ansible-project] Launch ec2 instances in multiple availability zones in single play

2015-06-04 Thread benno joy
wouldn't ec2_asg do that automatically for you ? On Fri, Jun 5, 2015 at 10:35 AM, Igor Cicimov ig...@encompasscorporation.com wrote: Hi all, I've been looking for the best way to achieve what is mentioned in the title of the message but haven't found any. At least not one that will

[ansible-project] Re: Windows Tag MisMatch

2015-06-04 Thread deloreandave
The first system I tried was Windows 7 and close to up-to-date. W2K8 R2 was no where near. I'll bring them both up-to-date and let you know if anything changes (hope Ansible is still around by the time I'm finished). On Thursday, June 4, 2015 at 4:49:22 PM UTC-4, Trond Hindenes wrote: Maybe

[ansible-project] Re: win_get_url and win_msi - file downloaded and installed even when not changed

2015-06-04 Thread Trond Hindenes
Great! I'll re-submit the PR to get it included into modules_extra. On Thursday, June 4, 2015 at 10:54:49 AM UTC+2, cos...@gmail.com wrote: Thanks Trond, Just replaced win_msi with win_package in task and it works fine. Kind Regards, Constantin -- You received this message because you

[ansible-project] Re: Windows Tag MisMatch

2015-06-04 Thread Trond Hindenes
Maybe that's something we should check on in the setup script of the node is a 2008r2 box? On Thursday, June 4, 2015 at 7:59:18 AM UTC+2, J Hawkesworth wrote: See http://docs.ansible.com/intro_windows.html#windows-system-prep Your server 2008 r2 machine may need to be patched due to a bug

Re: [ansible-project] Re: V2 is live

2015-06-04 Thread Bob Tanner
Many do I hate top posting. Opened an issue before I read your post. https://github.com/ansible/ansible/issues/11171 Still getting: $ source v1/hacking/env-setup python: can't open file 'setup.py': [Errno 2] No such file or directory But my v1 playbooks and plays are working now. On

Re: [ansible-project] Re: V2 is live

2015-06-04 Thread Matt Martz
Bob, We just synced the v1 directory with the v1_last branch to resolve the AttributeError. I don't believe the setup.py issue should affect things, or at least it hasn't affected anything for me. On Thu, Jun 4, 2015 at 12:55 AM, Bob Tanner basictheprog...@gmail.com wrote: Before I pollute

Re: [ansible-project] rds_param_group task not accepting correct values

2015-06-04 Thread benno joy
can you please update to latest version of both and see if that helps. On Thu, Jun 4, 2015 at 10:31 PM, Chanaka Samarajeewa chan...@jostle.me wrote: Hello Benno, We are using Boto version 2.34.0 and Ansible version 1.8.4. Thanks On Wed, Jun 3, 2015 at 8:28 PM, benno joy benno...@gmail.com

Re: [ansible-project] rds_param_group task not accepting correct values

2015-06-04 Thread Chanaka Samarajeewa
Thanks for the advice. On Thu, Jun 4, 2015 at 10:10 AM, benno joy benno...@gmail.com wrote: can you please update to latest version of both and see if that helps. On Thu, Jun 4, 2015 at 10:31 PM, Chanaka Samarajeewa chan...@jostle.me wrote: Hello Benno, We are using Boto version 2.34.0

Re: [ansible-project] How to handle dynamic inventories with playbooks

2015-06-04 Thread benno joy
you could just have - hosts: all and call the playbook via --limit stagec-webs, or let your script read a parameter from a file or environement variable which specifies the environment you want the inventory to be generated and only generate the inventory for that specific environment. - Benno

[ansible-project] --tags tag1 AND tag2, possible?

2015-06-04 Thread nusenu
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 Hi, I have a role which supports multiple platforms (Debian, RHEL, FreeBSD, OpenBSD). I use 'when: ansible_pkg_mgr == ...' a lot to autodetect, but that results in a lot of skipping... so I thought I might use tags in addition, so users can choose

[ansible-project] How do you ensure security when using ansible-pull?

2015-06-04 Thread David Reagan
ansible-pull checks out your entire project repository, then runs whichever playbook you tell it to. That repo is basically a map to your entire infrastructure. So, how do you ensure a compromised server doesn't reveal all that information to an attacker? (With the assumption that the

Re: [ansible-project] elasticache module doesn't work

2015-06-04 Thread Brian Coca
This does not seem to be a code issue, you are trying to use a feature that is not available to the AWS account you are using. On Thursday, June 4, 2015, Giovanni Albero giovannialbero.sol...@gmail.com wrote: Hi, I've tried to create an instance of elasticache, and when I've executed the

Re: [ansible-project] elasticache module doesn't work

2015-06-04 Thread Giovanni Albero
Using the same credentials with cache_subnet_group and a branch of ansible 2.0 everithing work fine. This mean that it's a code issue and not from our AWS account. do you have some more infos to solve the problem with the actual stable version (1.9.1) ? Il giorno giovedì 4 giugno 2015

[ansible-project] Re: elasticache module doesn't work

2015-06-04 Thread Giovanni Albero
Thank you so much, I'll attend which confirm. Il giorno giovedì 4 giugno 2015 17:32:59 UTC+2, Giovanni Albero ha scritto: Hi, I've tried to create an instance of elasticache, and when I've executed the script ansible has returned this failed: [localhost] = {failed: true} msg: Use of

Re: [ansible-project] Automate install of the controller

2015-06-04 Thread jaysmythe123
Thanks. I'm going along similar lines at the moment but was wondering how others (enterprises in particular) do it. On Wednesday, 3 June 2015 15:10:21 UTC+1, Michael Peters wrote: I put it in ansible like everything else. And then bootstrap the control node from my laptop (either a Mac or

Re: [ansible-project] WinRM configuration script error

2015-06-04 Thread benno joy
not sure here but are you using the latest version of the configure script ? https://github.com/ansible/ansible/blob/devel/examples/scripts/ConfigureRemotingForAnsible.ps1 also is the winrm server running on port 5985 5986, iirc On Thu, Jun 4, 2015 at 4:06 PM, Rene Metery

Re: [ansible-project] rds_param_group task not accepting correct values

2015-06-04 Thread Chanaka Samarajeewa
Hello Benno, We are using Boto version 2.34.0 and Ansible version 1.8.4. Thanks On Wed, Jun 3, 2015 at 8:28 PM, benno joy benno...@gmail.com wrote: Hi, Seems like a boto issue, can you please let us know which version of boto you are using and the ansible version, if not on the latest

[ansible-project] elasticache module doesn't work

2015-06-04 Thread Giovanni Albero
Hi, I've tried to create an instance of elasticache, and when I've executed the script ansible has returned this failed: [localhost] = {failed: true} msg: Use of cache security groups is not permitted in this API version for your account. FATAL: all hosts have already failed -- aborting

[ansible-project] git pull not supported by ansible git module?

2015-06-04 Thread namrata . deka
I have a private git repo and I want it cloned onto my remote servers in the first execution of my playbook. Thereafter I want my repo to be pulled, not cloned over and over again for any change i make in the repository. What is the way to do that? Right now my repo is cloned on every run of my

[ansible-project] WinRM configuration script error

2015-06-04 Thread Rene Metery
Hi, I am currently configuring a windows computer to accept remote access from ansible and I am having a problem while running the script ConfigureRemotingForAnsible.ps1. Here is the error : PS D:\Ansible\Power Shell 3 .\ConfigureRemotingForAnsible.ps1 Unable to establish an HTTP or HTTPS

Re: [ansible-project] elasticache module doesn't work

2015-06-04 Thread Brian Coca
only info I had was the error message: msg: Use of cache security groups is not permitted in this API version for your account. FATAL: all hosts have already failed -- aborting but that seems to be wrong from what you are saying, probably a bug in the module that has since then been fixed, I'll

Re: [ansible-project] Re: elasticache module doesn't work

2015-06-04 Thread benno joy
i think this commit 64a2077787904f144f77839660071f35f25d181f fixes your issue, where the code is changed to connect to the exact region for the vpc connection. earlier the vpc connection woudl be to region where your account might not have rights to vpc's for now i think you can create a

[ansible-project] How to handle dynamic inventories with playbooks

2015-06-04 Thread Samnang Sen
We pull our server inventory from a Netscaler. Servers that are binded to a specific LB group is considered active and we deploy code and/or restart services at when needed. I've written a Python script that outputs the hosts into JSON format for Ansible to work with. This works fine except I'm

Re: [ansible-project] authorising when ansible pull from private git repo

2015-06-04 Thread Mirko Friedenhagen
Hello Ye, if I remember right, you may define different permissions for repository collaborators in Gitlab. At least within organizations this is possible. Regards Mirko -- Sent from my mobile Am 03.06.2015 18:07 schrieb Ye Na Rhee gnr...@gmail.com: Hello all, I'm posting here because I

[ansible-project] ec2_vol create multiple devices

2015-06-04 Thread Igal Dahan
Hi i have trying to create several ec2 instances and 4 volumes for each instance, and i had trouble with it, here is part of it: create several instances : - name: Launch instances local_action: module: ec2 image: {{ image }} instance_type: {{

Re: [ansible-project] Making use of Ansible Privilege Escalation

2015-06-04 Thread Aneesh Joseph
Thank you Benno and Brian, that worked perfectly :-) - Aneesh On Thursday, June 4, 2015 at 11:02:29 AM UTC+5:30, benno joy wrote: ohh sorry yes, the variable i mentioned is used to change the 'sudo' binary. - Benno On Thu, Jun 4, 2015 at 10:46 AM, Aneesh Joseph aneesh...@gmail.com

Re: [ansible-project] ansible stuck when gathering fatcs.

2015-06-04 Thread yuyuntao
Ok, thank you. On Thursday, June 4, 2015 at 1:01:32 AM UTC+8, Brian Coca wrote: facts themselves have a timeout around them, but it is on the target side, IIRC we also have a connection timeout but that might be a bit longer. In any case, try with latest devel, there have been many

[ansible-project] Re: WinRM configuration script error

2015-06-04 Thread J Hawkesworth
Do you have windows management framework installed? On Thursday, June 4, 2015 at 4:32:59 PM UTC+1, Rene Metery wrote: Hi, I am currently configuring a windows computer to accept remote access from ansible and I am having a problem while running the script ConfigureRemotingForAnsible.ps1.

[ansible-project] Re: win_get_url and win_msi - file downloaded and installed even when not changed

2015-06-04 Thread cosbug
Thanks Trond, Just replaced win_msi with win_package in task and it works fine. Kind Regards, Constantin -- 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] Re: Bug in top-level playbook: tags broken

2015-06-04 Thread jang
On this subject, we've found a bunch of regressions where ansible's playbook semantics (especially when it comes to the behaviour of variables in included roles) don't appear to be nailed down. Is there a regression framework for test cases? I'm happy to submit a set of playbooks that

Re: [ansible-project] delegate_to does not work for array of hosts passed in to role

2015-06-04 Thread Barry Kaplan
Here's the new test: - set_fact: mongodb_candidate_master: {{mongodb_replica_set_hosts[0]}} run_once: true - name: var groups.mongod_rs_member[0] debug: var=groups.mongod_rs_member[0] run_once: true - shell: echo HELLO groups.mongod_rs_member + delegate_to:

Re: [ansible-project] Re: Access to files from library in a role

2015-06-04 Thread zorggy01
Hi Brian, I've written a Python module in a role using data that I'm going to change from time to time. That's why I wanted to separate the Python code from its data, I manually wrote it in a YAML file. I naively thought the files directory of the role would be the best place to keep it, but

[ansible-project] Bug in top-level playbook: tags broken

2015-06-04 Thread jang
See the attachment. With ansible 1.7.2 this works as expected: % ansible-playbook --version ansible-playbook 1.7.2 % ansible-playbook -i hosts/localhost a.yml --tags b PLAY [localhost] ** GATHERING FACTS

Re: [ansible-project] ec2_vol is not mounting the filesystem

2015-06-04 Thread Igal Dahan
Thanks a lot yes i used mkfs and mount for new fs in include task file and command shell for resize2fs for resizing existing one Igal On Wednesday, June 3, 2015 at 4:46:40 PM UTC+3, benno joy wrote: Hi, Curretly the ec2_vol module only supoprts creating a new volume and attaching it

Re: [ansible-project] --tags tag1 AND tag2, possible?

2015-06-04 Thread Brian Coca
not currently, a feature request we have is that tags get 'host expressions', so this would look like; tag1:tag2 but there is currently no code that does this On Thursday, June 4, 2015, nusenu nus...@openmailbox.org wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA512 Hi, I have a role

Re: [ansible-project] --tags tag1 AND tag2, possible?

2015-06-04 Thread nusenu
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 Brian Coca: not currently, a feature request we have is that tags get 'host expressions', so this would look like; tag1:tag2 but there is currently no code that does this thanks for the prompt reply. I tried to find that feature

Re: [ansible-project] Access to files from library in a role

2015-06-04 Thread Brian Coca
Hi, it might be easier to use lookup plugins to pass the data to the module, I really would need to know what the modules does and how it works before I can tell you the best approach. On Thursday, June 4, 2015, zorgg...@gmail.com wrote: Hi Brian, I've written a Python module in a role using