[ansible-project] Re: EC2 dynamic inventory: SSH rules

2016-08-31 Thread Soren Olegnowicz
Sure! Currently I run: " ansible all -m ping -i ec2.py " With: destination_variable = public_dns_name vpc_destination_variable = private_ip_address The return values for the ping will only return positive on the private vpc instances because the ping happens via the private IP's If I change

Re: [ansible-project] Missing something with host directory/file paths

2016-08-31 Thread Brian Coca
by default ansible looks in the local 'controller' for the `src=` parameter, you need to use `remote_src=yes` for it to look for it on the target machine. Also note that `remote_src=yes` does not support recursive copying. -- Brian Coca -- You received this message because you are

Re: [ansible-project] Re: yum module not updating package when installing from local file

2016-08-31 Thread Andrea C
Hmm, that's too bad. So you're just using the command module to do it manually? It seems strange that it doesn't even say "package is already present." When I use the zypper module on SLES on the same RPM file, it at least gives me that feedback in the results. On Tuesday, August 30, 2016 at

Re: [ansible-project] Ansible "MODULE FAILURE" on AIX node

2016-08-31 Thread Kai Stian Olstad
On 31. aug. 2016 22:03, Michelle Moreno GutiƩrrez wrote: Hi I have been traing to execute a "ls -l" command with ansible on an AIX group nodes but I get the next message error. Do the nodes have Python installed? If not you need to use the raw module. [root@machine1 ~]# ansible pdn-aix -a

[ansible-project] Missing something with host directory/file paths

2016-08-31 Thread Jon Langemak
It's been awhile since I played with Ansible and right now Im tearing my hair out on this copy problem. Im trying to copy a directory on a Linux host to a new location. In ad-hoc ansible, it looks like this... ansible -m copy -a "src=/usr/share/folder1 dest=/config/folder2" servers When I

[ansible-project] Ansible "MODULE FAILURE" on AIX node

2016-08-31 Thread Michelle Moreno GutiƩrrez
Hi I have been traing to execute a "ls -l" command with ansible on an AIX group nodes but I get the next message error. [root@machine1 ~]# ansible pdn-aix -a "ls -l" mdebddp03 | FAILED | rc=0 >> MODULE FAILURE epsmdebddp03 | FAILED | rc=0 >> MODULE FAILURE mdebddp02 | FAILED | rc=0 >>

Re: [ansible-project] Re: How do I pass a password as an argument?

2016-08-31 Thread Jacob brown
That's awesome Chris, thank you very much! I'm still learning Ansible so that's a huge help. Thanks again! On Wed, Aug 31, 2016 at 10:31 PM, Chris Helming wrote: > - name: Check if machine is bound > shell: /bin/bash -c "realm list | grep sssd" > register:

Re: [ansible-project] Missing something with host directory/file paths

2016-08-31 Thread Jon Langemak
Thank you! Is there a better means to recursively copy then? Or do I need to copy each file separately? On Wednesday, August 31, 2016 at 5:19:57 PM UTC-5, Brian Coca wrote: > > by default ansible looks in the local 'controller' for the `src=` > parameter, you need to use `remote_src=yes` for

Re: [ansible-project] Can I define my inventory in my playbook directory?

2016-08-31 Thread Dick Davies
We lay ours out in the playbook directory like this site.yml prod/ - group_vars/ - all - hosts staging/ - group_vars/ - all - hosts and then run with ansible-playbook -i $environment site.yml On 24 August 2016 at 16:02, skinnedknuckles

[ansible-project] UFW module issues

2016-08-31 Thread Guy Knights
I'm running into a confusing issue with the UFW module. I've been using the same role to configure my rules for a while without any problems, but recently I pulled the latest updates for stable-2.1 and now I'm getting the following error for the task below: - name: enable firewall policy if

Re: [ansible-project] Unable to install Ansible on Redhat 6.6 (RHEL) - missing dependency python-six

2016-08-31 Thread Dick Davies
It's in the 'extras' centos-6 repo, I don't have a RHEL VM to hand to check but I'd expect it to be in the RHN repos - from memory maybe the 'optional' one? On 31 August 2016 at 13:37, wrote: > > I am unable to install Ansible on Redhat 6.6 (RHEL) due to a missing >

[ansible-project] become:yes for local connection: when and how often is sudo called?

2016-08-31 Thread David Resnick
Hi, I'm trying to understand when ansible uses sudo in a scenario where a playbook with become:yes is running with a local connection. I have a playbook where I need to change the default execution PATH in sudoers for a following step to succeed. In order to run the playbook remotely, I need

[ansible-project] Ansible 2.1.2 RC2 is ready for testing

2016-08-31 Thread James Cammarata
Hi all, we're happy to announce that RC2 for 2.1.2 is now available for testing. This release candidate also adds the following fixes for bugs: * Fixed a bug in which INI files incorrectly treated a hosts range as a section header (#15331) * Fixed a bug in which the max_fail_percentage

[ansible-project] Re: Can I define my inventory in my playbook directory?

2016-08-31 Thread skinnedknuckles
Thanks Kai for pointing out my mistake!! On Wednesday, August 24, 2016 at 10:02:37 AM UTC-5, skinnedknuckles wrote: > > Management Node: > >- CentOs 6 >- Ansible 2.1 > > Remote Node: > >- Windows 7 >- Powershell 3.0 > > > My playbooks are all saved in

[ansible-project] Using lookup with log_path in ansible.cfg

2016-08-31 Thread Kevin Ying
I've seen some examples referring to the use of lookup with log_path to log output to datestamped logfiles: e.g. log_path = ~/.ansible/logs/ansible.{{ lookup('pipe', 'date +%Y%m%d') }}.log I've been trying various permutations of this pattern but nothing seems to work. File permissions are

[ansible-project] openstack restful api

2016-08-31 Thread nandareddy578
Hello All, Is there any way we can use restful api's instead of connecting using ssh to target machine? I've seen we can connect to local machine using local connection(connection: local). In the same way is there any mechanism in ansible through which we can connect to remote machine using

Re: [ansible-project] Re: Can I define my inventory in my playbook directory?

2016-08-31 Thread Kai Stian Olstad
On 31. aug. 2016 19:13, skinnedknuckles wrote: I must be missing something. I created a ansible.cfg file with this... [default] hostfile = /fs01/home/janderson/hosts and one with this... [default] inventory = /fs01/home/janderson/hosts This last one is almost correct, but you are missing

Re: [ansible-project] Ansible 2.1.2 RC2 is ready for testing

2016-08-31 Thread nusenu
Hi, are there any plans to fix regression [1] with ansible version 2.1.2? [1] https://github.com/ansible/ansible/issues/14829 thanks, nusenu -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop

[ansible-project] Re: HowTo: combine two lists in vars section/file

2016-08-31 Thread Jard Leex
Hi, to calrify the question here comes a shorten code block --- - hosts: localhost gather_facts: no vars: - simple: - right - middle - top - nested: - hostname: foo path: - left - hostname: bar path: - blue -

[ansible-project] Re: Always append a '/' to variable whose value is supplied as extra vars

2016-08-31 Thread ishan jain
Thanks for the Idea ayush :-) Custom filter seemed to much work as there are a lot of possibilities to cover. What i ended up doing is appending a '/' wherever the var is used, like - {{config_src}}/ This ensure that you have to give correct path to point inside the folder. Any extra '/' will

[ansible-project] Re: display a message at the end of a ansible playbook

2016-08-31 Thread pixel fairy
this as a task - debug: msg="you can now connect to http://xyz.com/setup.php to finish installation" you can also use variables in the message On Tuesday, August 30, 2016 at 1:27:45 PM UTC-7, synova.m...@gmail.com wrote: > > Hi, > > Is there a way to display a message on the screen at the

[ansible-project] Re: unable to evaluate conditional

2016-08-31 Thread fanvalt
I finally found out how to solve this but I don't understand why. I had to use the following syntax to use the register variable, even if the register variable was not containing an "_" in its name: - debug: msg="previous {{previous}}" - debug: msg="previous isdir

[ansible-project] unable to evaluate conditional

2016-08-31 Thread fanvalt
Hello, I don't understand where I am doing wrong in this simple tasks: - name: Search for bin directory stat: path: /{{ Directoryname }}/{{ item }}/bin register: previous with_items: "{{ shr4you_inst.stdout_lines }}" when: shr4you_inst|success - debug: msg="previous {{previous}}" -

Re: [ansible-project] unable to evaluate conditional

2016-08-31 Thread Kai Stian Olstad
On 31. aug. 2016 11:43, fanvalt wrote: Hello, I don't understand where I am doing wrong in this simple tasks: - name: Search for bin directory stat: path: /{{ Directoryname }}/{{ item }}/bin register: previous with_items: "{{ shr4you_inst.stdout_lines }}" when: shr4you_inst|success

[ansible-project] Re: unable to evaluate conditional

2016-08-31 Thread fanvalt
if I add 2 debug tasks this way , it seems the previous.stat is not defined anymore. - debug: msg="previous {{previous}}" - debug: msg="previous isdir {{previous.stat.isdir}}" - debug: msg="previous path {{previous.stat.path}}" TASK [4YOU : debug]

[ansible-project] Re: EC2 dynamic inventory: SSH rules

2016-08-31 Thread Soren Olegnowicz
Unfortunately, this setting does not help. Perhaps I need to run Ansible from within Amazon instead of locally? On Tuesday, August 30, 2016 at 5:21:06 AM UTC-4, Hagai Kariti wrote: > > You can set destination_variable to public_dns_name in ec2.ini (I think > this is the default). Amazon's DNS

[ansible-project] Re: How do I pass a password as an argument?

2016-08-31 Thread Chris Helming
- name: Check if machine is bound shell: /bin/bash -c "realm list | grep sssd" register: realmd_bound changed_when: false ignore_errors: true - name: Join using realmd expect: command: "/bin/bash -c '/usr/sbin/realm join -U {{ bind_user }} {{ bind_domain }}'" responses:

[ansible-project] Re: win_copy failing (timeout)

2016-08-31 Thread Justin Dugan
I have also tried unarchive which fails with the same error. -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To

[ansible-project] win_copy failing (timeout)

2016-08-31 Thread Justin Dugan
I am using this in the playbook: - name: copy {{eap_dir}}.0.zip win_copy: src="{{eap_dir}}.0.zip" dest="c:/temp/{{eap_dir}}.0.zip" And it's failing with: TASK [win_JBoss : copy jboss-eap-6.4.0.zip] [WARNING]: FATAL ERROR DURING FILE TRANSFER: Traceback

Re: [ansible-project] Need help with deprecation warnings

2016-08-31 Thread Kai Stian Olstad
On 30. aug. 2016 21:36, ayush.ku...@similarweb.com wrote: Hey all, Just trying to figure out how to fix the deprecation warnings (recently updated to 2.1.1.0 from 1.7). I used to have the 4 individual tasks in the block below (I left the commented out when statements from the original 1.7

Re: [ansible-project] Work with Jinja/template issue

2016-08-31 Thread Kai Stian Olstad
On 27. aug. 2016 05:20, Lupin Deterd wrote: Hi, I want to gather all the NICs and its IP address from facts. So I tried iterating to all interfaces, i.e {% for nic in ansible_interfaces %} {% set present_nic = 'facter_ipaddress_%s' | format( nic ) %} | {{ nic }} | {{ present_nic }} | {%

Re: [ansible-project] Re: EC2 dynamic inventory: SSH rules

2016-08-31 Thread Hagai Kariti
Can you elaborate on what doesn't work vs what you want? On Wed, Aug 31, 2016 at 5:09 PM Soren Olegnowicz wrote: > Unfortunately, this setting does not help. Perhaps I need to run Ansible > from within Amazon instead of locally? > > > On Tuesday, August 30, 2016 at

[ansible-project] Unable to install Ansible on Redhat 6.6 (RHEL) - missing dependency python-six

2016-08-31 Thread rbooth
I am unable to install Ansible on Redhat 6.6 (RHEL) due to a missing dependency for python-six. When I try to install python-six, I get this response. "No package python-six available." These are the steps I use to replicate the problem. -Download the x86_64 rpm for the EPEL repository wget

[ansible-project] Only execute task then certain URL is NOT reachable

2016-08-31 Thread guenther . grill
Hi, I have a setup with Apache Mesos and Marathon. I also deploy a Elasticsearch with JSON to the Mesos Cluster via Ansible. But this should only be done, when a certain endpont http://mesos...:8080/v2/apps/elasticserach is NOT reachable. That indicates, that the module is already (or isn't)

[ansible-project] Re: Can I define my inventory in my playbook directory?

2016-08-31 Thread skinnedknuckles
I must be missing something. I created a ansible.cfg file with this... [default] hostfile = /fs01/home/janderson/hosts and one with this... [default] inventory = /fs01/home/janderson/hosts and neither one worked. Where can I get a default or sample ansible.cfg file to modify? On