[ansible-project] SSH failure connection

2016-12-01 Thread Deepa Yr
Hi The playbook is failing with this error; FAILED! => {"changed": false, "failed": true, "invocation": {"module_name": "command"}, "module_stderr": "OpenSSH_6.6.1, OpenSSL 1.0.1e-fips 11 Feb 2013\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config

[ansible-project] Weird ec2_elb_facts error

2016-12-01 Thread Guy Knights
I'm running into a very odd problem with an ansible playbook that I'm running from Jenkins. The playbook executes the ec2_elb_facts module (without the names parameter). When it runs from my jenkins pipeline job, I get the following error: TypeError: argument of type 'NoneType' is not iterable

Re: [ansible-project] No module named markupsafe

2016-12-01 Thread João M . S . Silva
Hi, I got this error message: ERROR! Unexpected Exception: No module named markupsafe after installing and running ansible. I found out that the Python files for markupsafe where not in place: /usr/lib/python2.7/dist-packages/markupsafe did not exist. I solved this with: apt

Re: [ansible-project] Crontab run in specific timezone

2016-12-01 Thread Brian Coca
it already supports inserting environment vars, which is what that post shows. -- 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] Re: Compare two variables

2016-12-01 Thread marcin_zimnica
Problem solved This is working scenario --- - name: change MTU hosts: router connection: local vars: mtu_1: 'MTU is 1500' contents: "{{ lookup('file', '/home/marcin/var.json') }}" tasks: - name: show ip interface et0/0 ios_command: commands: - sh ip

Re: [ansible-project] do post_tasks execute when a role fails?

2016-12-01 Thread Kai Stian Olstad
On 01. des. 2016 14:31, sergio.guil...@mojix.com wrote: Hi, I created a role that has a rescue block where role is marked as failed: --- #myrole - block: ... rescue: - fail: msg='some message' #mark as fail ansible_failed_task is defined When ever Ansible run the fail module, it will

Re: [ansible-project] do post_tasks execute when a role fails?

2016-12-01 Thread Brian Coca
I forgot, there is also a 'always' section to blocks that runs tasks no matter the previous state. -- 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

Re: [ansible-project] do post_tasks execute when a role fails?

2016-12-01 Thread Brian Coca
To clarify as the question indicates some misunderstanding, roles can only fail on import, what is failing is a task (which happens to be in a role)​. Tasks in post_tasks, are just like any other task, the only difference is ordering, they get executed after all previous tasks/role sections.

[ansible-project] with_items and register in a role/main.yml

2016-12-01 Thread frank
r is avariable after registering. So i think you sgould use "{{ r }}" -- 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] Ansible module's default parameter value

2016-12-01 Thread Ondřej Macháček
Hello all, I would like to ask about the sense of the default values of the parameters of Ansible modules. Let me give you an example, let's say there is a module to manage Virtual Machines(VM), the module looks for example like this: module_vm: name: myvm memory: 1GiB When you run this

[ansible-project] with_items and register in a role/main.yml

2016-12-01 Thread stewart . paul
Hi, I've created a small demo below which demonstrates my problem. I can't seem to invoke the with_items and call {{item}} later on. What am I doing wrong? I've tried searching obviously but I can't find the direct answer, sorry for the newbie question. My playbook invokes a role, and below

[ansible-project] trouble using sros modules to log in with a specific user

2016-12-01 Thread Nick Keeling
First of all, I am still learning Ansible, so there is a very real possibility this is user error, but here is my issue: When I try to log in using the sros module, regardless of the username I am using in the yml file, it is using my username from the ansible host machine Here is the yml:

[ansible-project] Problems with using docker_image to pull an image

2016-12-01 Thread Stefán Stefánsson
Hi. I'm trying to use docker_image to pull an image from my private repository but I keep getting this error: "Get http://: http: no Host in request URL". Here is what my task list currently looks like: docker_login: registry: our.docker.repo.com username: foo password: bar -

[ansible-project] Simple refactoring testing

2016-12-01 Thread andrea crotti
Suppose I have a playbook that became too complex, and I start splitting it into roles, is there a way to do that ensuring nothing broke? If for example the order is the same specially, can I not see the list of generated actions and check that the operations done are exactly the same? How are

[ansible-project] Is Ansible a client/server protocol?

2016-12-01 Thread utunaaga
Hi There Hope this picture shows ok.

[ansible-project] playbook with dynamic variable interpolation doesn't work in ansible tower v2.4.5, any help with this?

2016-12-01 Thread rob
reference: http://docs.ansible.com/ansible/faq.html#when-should-i-use-also-how-to-interpolate-variables-or-dynamic-variable-names I have a playbook working fine via cli, however I am unable to figure why I cannot dynamically interpolate when running through tower. Statically is working fine.

[ansible-project] do post_tasks execute when a role fails?

2016-12-01 Thread sergio . guillen
Hi, I created a role that has a rescue block where role is marked as failed: --- #myrole - block: ... rescue: - fail: msg='some message' #mark as fail ansible_failed_task is defined On my playbook the idea is to send notification if ansible_failed_task is defined that's why "myrole"

[ansible-project] Ansible : ERROR! Decryption failed

2016-12-01 Thread Swathi Cutie
Hi , I am a newbie to ansible When i try to run the ansible-playbook i am getting a decryption failed error [root@localhost infrastructure]# ansible-playbook -i /home/swathi/Desktop/infrastructure/production/ec2.py vertica_role.yml ERROR! Decryption failed on

[ansible-project] Re: Possible bug with nxos_reboot module?

2016-12-01 Thread remy . pouppeville
Hi, I'm hitting the same issue when launching the playbook via Tower 3.0.3, when launching the same playbook via CLI I don't get the "UnboundLocalError: local variable 'body' referenced before assignment" error. Any update on this ? -- You received this message because you are subscribed to

[ansible-project] Ansible dynamic vars

2016-12-01 Thread Nirmal Kumar
I have a query regarding vars structure in Ansible. Example: -vars - sample.yml - tasks - main.yml In task: include_vars: sample.yml * - copy: src={{vars[inventory_hostname_short + '_instance' }} dest={{some_path}}* *or* * - copy:

[ansible-project] Question: how to use variable in with_sequence, casting to int results in zero value

2016-12-01 Thread frank
I am trying to process the result from the find module. The result contains 3 file paths which i would like to process in a loop. The number of files depends on the number of files found in the directories and is set by result.matched Using the with_sequence loop should do the trick, i think.

[ansible-project] Ansible model of operation - Client/Server?

2016-12-01 Thread utunaaga
Hi There I would greatly appreciate any comments on the accuracy and validy of my little picture Hope it is visible I dont see nay preview button here. Many thanks for

[ansible-project] Re: Error updating Zabbix Host (zabbix_host)

2016-12-01 Thread Dorian Basuyau
I encountered similar issue. Even when only enabling/disabling we need to specify a valid hostgroup for the Zabbix instance : https://github.com/ansible/ansible-modules-extras/blob/devel/monitoring/zabbix_host.py#L230 Thanks. D Le mardi 7 juin 2016 05:32:20 UTC+8, Reece Webb a écrit : > >

[ansible-project] Crontab run in specific timezone

2016-12-01 Thread Falldog Hsieh
ansible cron module doesn't support setup timezone info currently Hope to add this new feature Thanks reference from http://serverfault.com/questions/374284/crontab-schedule-in-different-timezones -- You received this message because you are subscribed to the Google Groups "Ansible Project"

Re: [ansible-project] Re: How to add something to ansible_facts?

2016-12-01 Thread Kai Stian Olstad
On 01. des. 2016 13:23, thokar...@gmail.com wrote: This is what I have now, and it is still not working. - name: Get app version command: curl -H application/json localhost:8088/rs register: get_version ignore_errors: true - name: Set app version as fact set_fact: fact_app_version:

Re: [ansible-project] MODULE FAILURE using Replace and with_together

2016-12-01 Thread Stankovic, Marko
I'm sorry, that was wrong solution. Cheers, Marko __ CONFIDENTIALITY NOTICE: This message is the property of International Game Technology PLC and/or its subsidiaries and may contain

Re: [ansible-project] MODULE FAILURE using Replace and with_together

2016-12-01 Thread Stankovic, Marko
Hi, The last sed has an unescaped single quote. You should replace this: sed "s/'//g" with this: sed "s/"'"//g" That's a single quote surrounded by double quotes. Backslash won't work. You'll find some explanations here:

Re: [ansible-project] Ansible on OpenBSD - failures in 'package' module

2016-12-01 Thread Brian Coca
This is fixed in devel and stable branches and should go out in the next releases. As a workaround set squash_actions in ansible.cfg: squash_actions=["apk, apt, dnf, homebrew, pacman, pkgng, yum, zypper"] -- Brian Coca -- You received this message because you are subscribed to the

Re: [ansible-project] Re: How to add something to ansible_facts?

2016-12-01 Thread thokari81
This is what I have now, and it is still not working. - name: Get app version command: curl -H application/json localhost:8088/rs register: get_version ignore_errors: true - name: Set app version as fact set_fact: fact_app_version: app_version: "{{ ((get_version |

Re: [ansible-project] Re: How to add something to ansible_facts?

2016-12-01 Thread thokari81
Am Donnerstag, 1. Dezember 2016 12:38:33 UTC+1 schrieb Ali Jabir: > > Hi there, > > Try doing, > > - name: Set fact > set_fact: > my_date_as_fact: my_date > > Thanks > -AliJ > That is what I have, it was a typo in my post. -- You received this message because you are subscribed to the

Re: [ansible-project] Re: How to add something to ansible_facts?

2016-12-01 Thread Ali Jabir
Hi there, Try doing, - name: Set fact set_fact: my_date_as_fact: my_date Thanks -AliJ On Thu, Dec 1, 2016 at 2:17 PM, wrote: > For example: > > - name: Get date > command curl http://some-url > register: my_date > > > - name: Set fact > set_fact: >

[ansible-project] Re: Variable undefined after set_fact

2016-12-01 Thread thokari81
> > > - set_fact: var2 = "something" > when: var2 is not defined > > - set_fact: var3 = "something" > when: var3 is not defined > Try this without spaces around the '=' . -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe

[ansible-project] Re: How to add something to ansible_facts?

2016-12-01 Thread thokari81
For example: - name: Get date command curl http://some-url register: my_date - name: Set fact set_fact: my_date_as_fact: my_date - name: Gather facts setup: register: {{ ansible_facts }} - name: Print facts debug: msg={{ ansible_facts }} "my_date_as_fact" is not included

[ansible-project] Re: Sudo auth fails in the middle of playbook

2016-12-01 Thread marko
The explanation seems to be that pam_tally2 records a failed login when login command is started, even before a password is entered. Normally, the failed logins counter is reset when the user enters the correct password. For login this works correctly when the following line is added in pam