Re: [ansible-project] template substitution

2016-06-01 Thread Josh Smift
PG> Many thanks for this information. For future reference where is this PG> documented? https://groups.google.com/forum/#!topic/ansible-project/qHyIjyal_Ic is a thread where it came up before, which says you can use a per template header to override this, you can see an example in the

Re: [ansible-project] Cloudformation module: output json

2016-06-01 Thread Ted Timmons
Tom, it doesn't appear AWS has released "changesets" as an API, it's only in the console. That's the best bet, I think. (Of course, you could save and diff JSON..) On Tue, May 31, 2016, 22:45 Tom De Blende wrote: > Hi all, > > I am looking into deploying AWS

Re: [ansible-project] Ansible 2.0.0.2 main.yml fails with "ERROR! no action detected in task"

2016-06-01 Thread einarc
Thank You, BTW! On Wednesday, June 1, 2016 at 3:43:37 PM UTC-7, Daniel Osielczak wrote: > > Found the bug report I filed back then. As you can see, this type of > include is unsupported: > > https://github.com/ansible/ansible/issues/15119 > > W dniu środa, 1 czerwca 2016 23:37:39 UTC+1

Re: [ansible-project] Ansible 2.0.0.2 main.yml fails with "ERROR! no action detected in task"

2016-06-01 Thread einarc
Agreed, Spent sometime banging my head just to get to version 2.1 using pip but that didn't fix the issue. Trying other workarounds like these did not work either. What really bothers me is how CRYPTIC ansible error messages are. I would have to look at the Python code flow and debug it to

Re: [ansible-project] template substitution

2016-06-01 Thread Peter Gray
Many thanks for this information. For future reference where is this documented? The interaction of ansible with jinga2 seems a bit opaque. On Wed, Jun 1, 2016 at 11:12 PM, Brian Coca wrote: > ansible uses the trim_blocks setting when invoking jinja, by default its > 'yes'. >

[ansible-project] Re: Unusual WinRM connection issue

2016-06-01 Thread skinnedknuckles
Actually I had to type winrm set winrm/config/service '@{AllowUnencrypted="true"}' before it would work for me. On Friday, May 27, 2016 at 9:26:32 AM UTC-5, Mike Fennemore wrote: > > I have a selected few workgroup Windows server 2012 R2 servers that give > the following error: > >

Re: [ansible-project] Ansible 2.0.0.2 main.yml fails with "ERROR! no action detected in task"

2016-06-01 Thread Daniel Osielczak
Found the bug report I filed back then. As you can see, this type of include is unsupported: https://github.com/ansible/ansible/issues/15119 W dniu środa, 1 czerwca 2016 23:37:39 UTC+1 użytkownik Daniel Osielczak napisał: > > Hi, > > if I remember correctly, I was never able to fix the

[ansible-project] Server not found in Kerberos Database

2016-06-01 Thread skinnedknuckles
Control Node: - CentOS 7 - Ansible 2.1 - pywinrm version from May 19th, 2016 Remote Node: - Windows 7 - Powershell 3 I'm having trouble connecting to my remote node with kerberos. I have carefully followed all the instructions from the Ansible Docs website

Re: [ansible-project] Ansible 2.0.0.2 main.yml fails with "ERROR! no action detected in task"

2016-06-01 Thread Daniel Osielczak
Hi, if I remember correctly, I was never able to fix the problem and ended up using a workaround. I will try to get the environment back online to see what it was exactly but I remember it wasn't pretty. BR, Daniel W dniu środa, 1 czerwca 2016 17:14:18 UTC+1 użytkownik einarc napisał: > > My

Re: [ansible-project] Bug in shell module? Wrong syntax not noticed

2016-06-01 Thread Brian Coca
​the problem is you are mixing syntax: this is valid: ​- name: "copy file" shell: "cp /some/path/to/a/file.txt /home/foobar/some/other/path creates="/home/foobar/some/other/path/file.txt" this is also valid: - name: "copy file" shell: "cp /some/path/to/a/file.txt

[ansible-project] Re: Role dependencies gets skipped in ansible 2

2016-06-01 Thread Grim76
I am having the same issue. Have you been able to find a fix to this? On Tuesday, March 8, 2016 at 8:54:59 AM UTC-5, deep@gmail.com wrote: > > Hi, > > I was trying to upgrade from ansible 1.8.4 to ansible 2, and noticed that > some of my roles with meta dependencies stopped working. > > I

Re: [ansible-project] Re: Unlock and Lock users across multiple machines

2016-06-01 Thread Alan Harkleroad
For the password feature yes when creating new accounts we will make use of that, the uid/guid, and other user module features On Wednesday, June 1, 2016 at 2:20:24 PM UTC-4, Johannes Kastl wrote: > > On 01.06.16 20:17 Alan Harkleroad wrote: > > > ansible test-server-suite -s -m shell -a

[ansible-project] Fact caching

2016-06-01 Thread Josh Smift
How does fact caching work with JSON files and expiration time? The particular weird symptom I'm seeing is that the cache file for a host is getting written to as various plays run, but the contents of the cache are stale. If the mtime of the cache file is what determines expiration, it seems like

Re: [ansible-project] Re: Unlock and Lock users across multiple machines

2016-06-01 Thread Alan Harkleroad
I will give that playbook a try. I didnt want to change the default password we already had provided them on initial account creation, just let them do it when they logged in. It remains locked until they tell me they are ready to login the first time. On Wednesday, June 1, 2016 at 2:20:24

Re: [ansible-project] Unlock and Lock users across multiple machines

2016-06-01 Thread Johannes Kastl
On 01.06.16 20:01 Alan Harkleroad wrote: > 2. If i run it adhoc using ansible like so I get a response saying only > root can do this. > > ansible -m shell -a "passwd -u username" "test-server-suite" > --ask-become-pass > > Is there no way to run that ad hoc from command line or as a playbook

[ansible-project] Re: Unlock and Lock users across multiple machines

2016-06-01 Thread Alan Harkleroad
I figured it out, not sure if anyone else does it this way ad hoc but its a start ansible test-server-suite -s -m shell -a "passwd -u username" -K Prompts for my sudo credentials and away it goes. Worked across all 20 machines. Might be messy or can be simplified but I am learning as I go.

Re: [ansible-project] Locked/Unlocked states in user module

2016-06-01 Thread Alan Harkleroad
Are we able to do this yet? As we create new users across our network, by default their accounts are locked on creation for security until they are unlocked for initial use. Is there a way to use ansible to unlock the same user account across multiple machines with one playbook or ad hoc

[ansible-project] Re: Unusual WinRM connection issue

2016-06-01 Thread Matt Davis
Sorry, by "local user" I just meant using a non-domain user via pywinrm/Ansible. But yeah, for Basic to work, you'd have to (temporarily) enable unencrypted auth with something like: Set-Item WSMan:\localhost\Service\AllowUnencrypted $true The HTTPS_PROXY not working seems odd- I use it dozens

Re: [ansible-project] env-setup & ./hacking missing gtom ansible.tat.gz

2016-06-01 Thread Johannes Kastl
On 30.05.16 10:15 hubrecht.v.dal...@gmail.com wrote: > So I have downloaded a tarball from releases.ansible.com, and looked at > "running > form source " to > get instructions to continue, without success. > > the page suggests the

Re: [ansible-project] Install software to Windows machine...

2016-06-01 Thread Johannes Kastl
On 31.05.16 22:54 aaron.truji...@total.care wrote: > Basically i have a file on a local shared drive that I want to install on > my windows machines. I think I remember reading that in this case you should split the task: download the file and then install it. Maybe split the task even

[ansible-project] Re: Can individual variables be set to no_log?

2016-06-01 Thread Jeremy Young
Looks like you can do it by play or for an entire playbook: http://docs.ansible.com/ansible/faq.html#how-do-i-keep-secret-data-in-my-playbook On Wednesday, June 1, 2016 at 10:36:31 AM UTC-5, Joanna Delaporte wrote: > > I thought I ran across a playbook output that indicated individual >

Re: [ansible-project] Ansible 2.0.0.2 main.yml fails with "ERROR! no action detected in task"

2016-06-01 Thread einarc
My bad, I tried to edit my original post and add the quotes, it doesn't matter whether you include them or not. The problem is a combination of the include and hosts statements. The ansible github page says this is patched in 2.1, see my previous post. On Wednesday, June 1, 2016 at 9:10:08 AM

Re: [ansible-project] Ansible 2.0.0.2 main.yml fails with "ERROR! no action detected in task"

2016-06-01 Thread Johannes Kastl
On 01.06.16 17:59 einarc wrote: > hosts: {{host_ip}} > > Error: > fatal: [localhost]: FAILED! => {"failed": true, "reason": "Syntax Error > while loading YAML.\n\n\nThe error appears to have been in '/path_to/ > auxiliary_playbook.yml': line 1, column 11, but may\nbe elsewhere in the > file

Re: [ansible-project] Re: Is the user module idempotent?

2016-06-01 Thread Johannes Kastl
On 01.06.16 17:51 Matt Martz wrote: > Alternatively, you could look at the `update_password` option for the user > module. http://docs.ansible.com/ansible/user_module.html > > The default is `always` > > "`always` will update passwords if they differ. `on_create` will only set > the password

Re: [ansible-project] Ansible 2.0.0.2 main.yml fails with "ERROR! no action detected in task"

2016-06-01 Thread einarc
Hey, It looks like we need to patch ansible https://github.com/ansible/ansible/issues/15715 On Sunday, March 13, 2016 at 3:50:53 PM UTC-7, Daniel Osielczak wrote: > > Hi Matt, > > thanks for quick answer. As already mentioned, I don't belive this to be a > problem with this playbook, as it

Re: [ansible-project] Re: Is the user module idempotent?

2016-06-01 Thread Matt Martz
Alternatively, you could look at the `update_password` option for the user module. http://docs.ansible.com/ansible/user_module.html The default is `always` "`always` will update passwords if they differ. `on_create` will only set the password for newly created users." On Wed, Jun 1, 2016 at

[ansible-project] Can individual variables be set to no_log?

2016-06-01 Thread Joanna Delaporte
I thought I ran across a playbook output that indicated individual variables had been set with a no_log parameter. Unfortunately, I cannot find the website where I saw it yesterday. Is it actually possible to specify no_log by variable? Thanks! Joanna -- You received this message because you

Re: [ansible-project] Re: Is the user module idempotent?

2016-06-01 Thread Kai Stian Olstad
On 01.06.2016 17:00, Johannes Kastl wrote: On 01.06.16 15:25 Uditha Desilva wrote: I believe that's because the password_hash function uses a random seed, so the actual encrypted password will be different each time. Any idea how to avoid this? Storing the hash of the password in a

Re: [ansible-project] Removing a user from a group using Ansible and the USER module

2016-06-01 Thread Alan Harkleroad
Thank you very much. That worked. Now on to more complex tasks. Got to learn to crawl before you can walk. I used it from my test case to my live production and the expected result did what we wanted. On Wednesday, June 1, 2016 at 10:09:09 AM UTC-4, Kai Stian Olstad wrote: > > On 01.06.2016

Re: [ansible-project] Removing a user from a group using Ansible and the USER module

2016-06-01 Thread Kai Stian Olstad
On 01.06.2016 15:42, Alan Harkleroad wrote: --- - hosts: test sudo: yes tasks: - name: Create a test user for trials user: name=testuser1 group=some-group groups=wheel,cdrom,additional groups password=somehasedpassword shell=/bin/bash state=present append=yes

Re: [ansible-project] get_url module failed when we download file from ftp with username and password

2016-06-01 Thread Johannes Kastl
On 01.06.16 11:25 pawan kumar wrote: > // when i run my yml file than it gives above like error how to fix the ftp > to download files. As crystal balls are pretty hard to read, could you provide your yml file (redacted, of course)? Johannes -- You received this message because you are

[ansible-project] Removing a user from a group using Ansible and the USER module

2016-06-01 Thread Alan Harkleroad
Good morning. I am trying to run a test case where I can edit a users groups using a playbook in Ansible on CENTOS 6.7 Ansible version 1.9.2 currently installed. After thorough research of other postes and the user module itself I dont see any ways to take a group out of a users profile only

Re: [ansible-project] raw module: where is the python source code?

2016-06-01 Thread Brian Coca
​action plugins run instead of modules of the same name, since raw does not copy any ansible code to the target, it needs to execute itself on the controller. https://github.com/ansible/ansible/blob/devel/lib/ansible/plugins/action/raw.py -- Brian Coca -- You received this message

Re: [ansible-project] Dynamic inventory cache

2016-06-01 Thread Brian Coca
in 2.1 ansible supports a yaml inventory file format, this can read json but the format is not the same as the 'dynamic script' output. -- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and

Re: [ansible-project] global name 'ANSIBLE_VERSION' is not defined

2016-06-01 Thread Brian Coca
ANSIBLE_VERSION was removed in 2.1 and all modules that depended on it were fixed in devel, but it seems blockinfile in 2.1 still uses it. I've pushed a fix to stable-2.1 and it should be out in a possible 2.1.1 or eventually in 2.2 -- Brian Coca -- You received this message because

[ansible-project] Re: Is the user module idempotent?

2016-06-01 Thread Uditha Desilva
I believe that's because the password_hash function uses a random seed, so the actual encrypted password will be different each time. On Wednesday, 1 June 2016 13:28:38 UTC+1, Johannes Kastl wrote: > > Hi all, > > I tried the following task, but it reports 'changed' each time it > runs. Is

Re: [ansible-project] template substitution

2016-06-01 Thread Brian Coca
ansible uses the trim_blocks setting when invoking jinja, by default its 'yes'. ansible allows for overrides by creating a special header: ``` #jinja2: trim_blocks: False # # {% if i_want_yes %} yes {% else %} no {% endif %} # ``` -- Brian Coca -- You received this message because

Re: [ansible-project] template substitution

2016-06-01 Thread Johannes Kastl
On 01.06.16 07:23 Peter Gray wrote: > If I have in a template file > > # > # {% if i_want_yes %} yes {% else %} no {% endif %} > # I normally write it like this: {% if i_want_yes %} # yes {% else %} # no {% endif %} Would that work for you? Johannes -- You received this message because you

[ansible-project] get_url module failed when we download file from ftp with username and password

2016-06-01 Thread pawan kumar
fatal: [192.168.0.111]: FAILED! => {"changed": false, "dest": "/root/", "failed": true, "gid": 0, "group": "root", "mode": "0755", "msg": "Request failed", "owner": "root", "response": "OK (unknown bytes)", "secontext": "unconfined_u:object_r:admin_home_t:s0", "size": 4096, "state":

[ansible-project] raw module: where is the python source code?

2016-06-01 Thread sparkvilla
Hi all. I am new to Ansible. I would like to have a look at the python code for the raw module. I went under ansibe/ansible-modules-core/command/raw.py but I see only the DOCUMENTATION and EXAMPLES. So where can I find the code for this module? thank you

Re: [ansible-project] Re: Installation of 2.0

2016-06-01 Thread Johannes Kastl
On 01.06.16 10:36 hubrecht.v.dal...@gmail.com wrote: > Hi Dmitry, > > Can I use something similar to create package for RedHat Linux? I have the > problem that the machine inside the network that I want to use as a master, > doesn't have internet, so I will probably need to create a >

[ansible-project] Bug in shell module? Wrong syntax not noticed

2016-06-01 Thread Johannes Kastl
Dear all, I stumbled upon this code, because it was not idempotent and reported as changed each time I ran the playbook: - name: "copy file" shell: "cp /some/path/to/a/file.txt /home/foobar/some/other/path" args: creates="/home/foobar/some/other/path/file.txt" Somehow I had missed that

[ansible-project] Is the user module idempotent?

2016-06-01 Thread Johannes Kastl
Hi all, I tried the following task, but it reports 'changed' each time it runs. Is this intentional? - name: "create user" user: name="foobar" password="{{ some_variable | password_hash('sha512') }}" createhome=yes state=present register: some_result_variable Ansible 2.1 running

Re: [ansible-project] Dynamic inventory cache

2016-06-01 Thread André Cruz
On Thursday, May 26, 2016 at 3:40:58 PM UTC+1, Brian Coca wrote: > > You've hit the nail on the head! We do have plans to make a 'inventory > cache' part of Ansible itself, currently its up to each script and of > course we have different implementations and some that don't implement any. >

[ansible-project] Advice on best way to sync root-owned files from one remote server to a group of others?

2016-06-01 Thread Uditha Desilva
Hi, I'm trying to create a Playbook to synchronize some initialization scripts and crontabs across a VCS cluster. The cluster itself is on RHEL5, so I am trying to use a RHEL7 server as a controller. The key restriction here is that we cannot have direct root login via the network (i.e.

[ansible-project] No Networking Working Group IRC Meeting today

2016-06-01 Thread Peter Sprygada
We will resume at our regular time next week. -- 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 post to this

[ansible-project] Re: Installation of 2.0

2016-06-01 Thread hubrecht . v . dalsen
Hi Dmitry, Can I use something similar to create package for RedHat Linux? I have the problem that the machine inside the network that I want to use as a master, doesn't have internet, so I will probably need to create a package(preferably rpm) to install this, but as a Solaris man, I

[ansible-project] Re: Installation of 2.0

2016-06-01 Thread Dmitry Owl
This packages required for compiling. Without these packages you will get error like this: dpkg-checkbuilddeps: Unmet build dependencies: cdbs debhelper (>= 5.0.0) dpkg-buildpackage: warning: build dependencies/conflicts unsatisfied; aborting dpkg-buildpackage: warning: (Use -d flag to

[ansible-project] ansible 2.0.1.0 run show version with Cisco ASA-55x0

2016-06-01 Thread Ludi Fang
*I could login the cisco device with SSH and run the show version successfully.* - [root@peklnelh03 ansible]# ssh ...@10.106.65.xxx x...@10.106.65.xxx's password: