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

2015-06-03 Thread Trond Hindenes
None of those modules perform any checking on wether the file is already downloaded /msi is already installed, so the behaviour you see is per design. There is a win_package available which is built on the same code as the Package DSC resource and more robust. I thought there was a PR for that

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

2015-06-03 Thread Brian Coca
can you not just give them read only access? On Wed, Jun 3, 2015 at 11:48 AM, Ye Na Rhee gnr...@gmail.com wrote: Hello all, I'm posting here because I couldn't figure out the solution even after searching the internet for long... I'm trying to use ansible pull on my remote machines. The

[ansible-project] rds_param_group task not accepting correct values

2015-06-03 Thread Chanaka Samarajeewa
Hello, I have the following task that creates a rds parameter group in a aws region. All the parameter values are valid. I can enter these manually in aws console and they are accepted. However Ansible is complaining about long_query_time: 0 and max_connect_errors:

[ansible-project] Ansible Conditionals not working as expected.

2015-06-03 Thread Brian Coca
In your first example, too many moustaches!!, when has an implied {{ }} around the expression, it won't work when you add {{ }} inside a when. have you tried this?: when: not passphrase_length.results[0].stdout == 0 -- Brian Coca -- Brian Coca -- You received this message because you

[ansible-project] Re: from ansible.utils Cannot import makedirs_safe

2015-06-03 Thread Michael Legleux
I currently am relying on ansible_ssh_host. I am assuming once our client machines have DNS entries, the ansible server will not need ansible_ssh_host defined correct? -- You received this message because you are subscribed to the Google Groups Ansible Project group. To unsubscribe from this

Re: [ansible-project] Re: from ansible.utils Cannot import makedirs_safe

2015-06-03 Thread Brian Coca
as long as the inventory_hostname is resolvable, there is not need for ansible_ssh_host On Wed, Jun 3, 2015 at 5:49 PM, Michael Legleux legl...@gmail.com wrote: I currently am relying on ansible_ssh_host. I am assuming once our client machines have DNS entries, the ansible server will not need

[ansible-project] su for role and password from vault

2015-06-03 Thread knacktus
Hi guys, I need to run my roles as different user. However, the users don't have login permissions. I need to su after logon with the user that executes the ansible playbook. I've already stored the different user ids and passwords in a vault. But I don't know where to point to the password.

[ansible-project] Re: su for role and password from vault

2015-06-03 Thread knacktus
Ok, I've got a working solution after some trial and error. Here it is for reference ... Role vars, where sysipf1_pwd is stored in a vault: Enter code here...--- # file: roles/java/vars/main.yml ansible_become_pass: {{ sysipf1_pwd }} java_directory: {{ ipf_soft_dir }}/java java_archive:

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

2015-06-03 Thread zorggy01
Thank you for your reply. As I wrote, I've created a Python module. I now access files in files directory through absolute path, but I would like to be more flexible, staying in the role directory. My question is: How do I write, in Python, access to a file in filesdirectory? On Monday,

[ansible-project] --list-roles like --list-task

2015-06-03 Thread Jeff Reter
Hello, is there something like --list-roles like --list-task i need to know with host (playbooks) will change if i change a role. 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

[ansible-project] Howto add a task from a callback

2015-06-03 Thread Jeff Reter
what is the right way to add a task to the end of a playbook from a callback i need to add a task based on an if in the callback playbook_on_start can you give me an example of an simlpe command taks like echo hello (i dont need vars) Thanks! -- You received this message because you are

[ansible-project] ansible stuck when gathering fatcs.

2015-06-03 Thread yuyuntao
I resolved this problem by add timeout in runner/connection_plugins/ssh.py, such as: 157 import time 158 start = time.time() 159 TIMEOUT = self.runner.timeout*2 160 while True: 161 rfd, wfd, efd = select.select(rpipes, [], rpipes, 1) 162 163

Re: [ansible-project] Get shell environment variables on target after going thru a bastion

2015-06-03 Thread Steve Orr
No, I'm afraid the -i flag does not make a difference. I'm trying to avoid a shell hack and it just seems really basic that we should have easy access to the environment variables of the target login account. On Tuesday, June 2, 2015 at 11:12:37 PM UTC-6, benno joy wrote: if gather_facts

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

2015-06-03 Thread Michael Peters
I put it in ansible like everything else. And then bootstrap the control node from my laptop (either a Mac or Linux laptop). And there after I run that same ansible script on the control node against itself. On Wed, Jun 3, 2015 at 5:47 AM, jaysmythe...@gmail.com wrote: Is there a recomended way

[ansible-project] ec2_vol is not mounting the filesystem

2015-06-03 Thread Igal Dahan
Hi I have created playbook which i can provision ec2 instance and create volume to that ec2 instance but when i am connected into the instance the volume is not recognized and seems not partitioned and thus not mounted. my questions are: is the ec2_vol create or attach are partitioning and

Re: [ansible-project] corrupted output when running script module

2015-06-03 Thread Brian Coca
The warning is not from ansible, but from sudo, which ansible is using at your request. Sudo is trying to verify the hostname and spurting the message into stdout, since Ansible is executing your script under sudo it gets both outputs and cannot distinguish which came from which. The common

[ansible-project] Automate install of the controller

2015-06-03 Thread jaysmythe123
Is there a recomended way to automate the install of the control node? I.e. the install and configuration of ansible itself? Or is it up to each admin to script and store in a repo in order to rapidly provision in case an existing control node fails. -- You received this message because you

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

2015-06-03 Thread benno joy
Hi, Curretly the ec2_vol module only supoprts creating a new volume and attaching it to an instance. It doesnt partition them and mount them. probably you should use modules like 'lvg,lvol,filesystem and mount to get the other things in place. On Wed, Jun 3, 2015 at 6:51 PM, Igal Dahan

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

2015-06-03 Thread cosbug
Hi All, I'm using win_get_url module to download an MSI package and then win_msi to install it. It turns out that every time I run a playbook both tasks return status changed even the file was previously downloaded and installed in the preceding run. Am I right that these modules do not

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

2015-06-03 Thread Ye Na Rhee
Hello all, I'm posting here because I couldn't figure out the solution even after searching the internet for long... I'm trying to use ansible pull on my remote machines. The problem is that the git repository that I'm trying to pull from is private. The server's SSH key has been added to the

Re: [ansible-project] Howto add a task from a callback

2015-06-03 Thread Brian Coca
callbacks have no influence on playbooks, they are to handle output from plays/tasks, information only goes in one direction. if you need a conditional task, put it int the play -- Brian Coca -- You received this message because you are subscribed to the Google Groups Ansible Project group.

[ansible-project] Re: unarchive

2015-06-03 Thread Nate Dobbs
Also - try updating your unzip packages on your host as well, I know there are incompatible versions of unzip that break the unarchive module - it may not solve your problem but its worth a try. On Wednesday, June 3, 2015 at 12:53:32 PM UTC-4, Nate Dobbs wrote: I've run into this too on

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

2015-06-03 Thread Brian Coca
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 changes to the connections and this might have been 'fixed'. -- Brian Coca -- You received

Re: [ansible-project] --list-roles like --list-task

2015-06-03 Thread Brian Coca
none exists yet. On Wed, Jun 3, 2015 at 2:35 AM, Jeff Reter jeff.re...@gmail.com wrote: Hello, is there something like --list-roles like --list-task i need to know with host (playbooks) will change if i change a role. Thanks -- You received this message because you are subscribed to the

Re: [ansible-project] corrupted output when running script module

2015-06-03 Thread dave
ok thanks On Wednesday, June 3, 2015 at 6:09:36 AM UTC-7, Brian Coca wrote: The warning is not from ansible, but from sudo, which ansible is using at your request. Sudo is trying to verify the hostname and spurting the message into stdout, since Ansible is executing your script under

[ansible-project] Re: unarchive

2015-06-03 Thread Nate Dobbs
I've run into this too on version 1.9.1 I ended up converting my unarchive code ( worked before upgrade ) and ended up using the 'command' module with creates support. On Wednesday, June 3, 2015 at 12:14:17 AM UTC-4, knac...@googlemail.com wrote: Hi guys, after upgrading from 1.8 to 1.9.1

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

2015-06-03 Thread Brian Coca
modules do not access local files on the master (unless running with localhost target/local_action/etc) in the case of copy, it's action_plugin is the one doing this, then copying the file remotely so the copy module can use it. On Wed, Jun 3, 2015 at 5:03 AM, zorgg...@gmail.com wrote: Thank

[ansible-project] Re: Windows Tag MisMatch

2015-06-03 Thread J Hawkesworth
Is your server 2008 r2 machine fully up to date with Windows updates. There is a known bug in wmf 3 - see the blue note box in the windows system prep section of this page in the documentation http://docs.ansible.com/intro_windows.html#windows-system-prep Hope that helps. Jon -- You

[ansible-project] Re: V2 is live

2015-06-03 Thread Bob Tanner
Before I pollute the issue tracker, cannot get v1 code to source properly. $ git show commit 0826106441d15820d086c1c9eaf6242aa80e4406 Author: Brian Coca **snip**@gmail.com Date: Wed Jun 3 22:19:26 2015 -0400 $ ansible --version ansible 2.0.0 (devel 0826106441) last updated 2015/06/03 21:55:07

[ansible-project] Re: Windows Tag MisMatch

2015-06-03 Thread deloreandave
Anything else I can offer that would help here? I just set up Windows Server 2008 R2 and get the same error on that as well. On Monday, June 1, 2015 at 10:23:19 PM UTC-4, delore...@gmail.com wrote: I tried changing the port to 5985. I do notice that it uses http now, but with the same

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

2015-06-03 Thread Aneesh Joseph
Thanks for the very quick response Brian. I see that it's trying to execute sudo -k sudo -H -S -p [sudo via ansible, key=abcdefghijk] password: *-u root /bin/sh* -c '''echo BECOME-SUCCESS-abcdefghijk; LANG=C LC_CTYPE=C /usr/bin/python

[ansible-project] Re: Windows Tag MisMatch

2015-06-03 Thread J Hawkesworth
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 in wmf 3 Jon -- You received this message because you are subscribed to the Google Groups Ansible Project group. To unsubscribe from this group and stop

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

2015-06-03 Thread benno joy
try setting 'sudo_exe=/bin/bash in ansible.cfg or export ANSIBLE_SUDO_EXE=/bin/bash in your cli and then running the playbook, usually /bin/sh is link to /bin/bash in centos/rhel systems. - Benno -- You received this message because you are subscribed to the Google Groups Ansible Project

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

2015-06-03 Thread Aneesh Joseph
Thanks Brian :) I do have access to execute certain sudo commands without chaining privilege escalation methods. sudo -l gives me a list of what I can execute. But Ansible seems to be executing something other than this. For example I get the below error while running a playbook which has

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

2015-06-03 Thread Brian Coca
use - to show the exact things being run, the message you are seeing implies you need to provide a sudo password On Wed, Jun 3, 2015 at 10:27 PM, Aneesh Joseph aneeshkj1...@gmail.com wrote: Thanks Brian :) I do have access to execute certain sudo commands without chaining privilege

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

2015-06-03 Thread benno joy
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 boto version then can you try updating to the latest and see if that helps. - Benno On Thu, Jun 4, 2015 at 4:57 AM, Chanaka Samarajeewa chan...@jostle.me

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

2015-06-03 Thread Aneesh Joseph
Thanks Benno, I hope you meant setting '*executable = /bin/bash*' in ansible.cfg? - Aneesh On Thursday, June 4, 2015 at 10:38:22 AM UTC+5:30, benno joy wrote: try setting 'sudo_exe=/bin/bash in ansible.cfg or export ANSIBLE_SUDO_EXE=/bin/bash in your cli and then running the playbook,

[ansible-project] Re: Using ansible with windows

2015-06-03 Thread Michael Legleux
Looks your're trying to run the html page on github. Try saving and running this link: https://raw.githubusercontent.com/ansible/ansible/devel/examples/scripts/ConfigureRemotingForAnsible.ps1 On Wednesday, June 3, 2015 at 10:45:04 AM UTC-7, David Teague wrote: Hi, I am following the guide to

Re: [ansible-project] Re: from ansible.utils Cannot import makedirs_safe

2015-06-03 Thread Brian Coca
that is probably different but unrelated issue, are you relying on ansible_ssh_host to set the correct address? if so that is a currently open issue. On Wed, Jun 3, 2015 at 2:13 PM, Michael Legleux legl...@gmail.com wrote: Well I don't see the import error anymore but most of the error is the

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

2015-06-03 Thread benno joy
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 aneeshkj1...@gmail.com wrote: Thanks Benno, I hope you meant setting '*executable = /bin/bash*' in ansible.cfg? - Aneesh On Thursday, June 4, 2015 at

[ansible-project] Using ansible with windows

2015-06-03 Thread David Teague
Hi, I am following the guide to get windows prepared to be managed by ansible. However I am getting errros in powershell with the provided script. https://github.com/ansible/ansible/blob/devel/examples/scripts/ConfigureRemotingForAnsible.ps1 Errors - At

[ansible-project] Re: from ansible.utils Cannot import makedirs_safe

2015-06-03 Thread Michael Legleux
Well I don't see the import error anymore but most of the error is the same: Now I get this: win7 | FAILED! = {'failed': True, 'exception': 'Traceback (most recent call last):\n File /home/ansible/ansible/lib/ansible/executor/proc ess/worker.py, line 118, in run\nexecutor_result =