Re: [ansible-project] Re: Permissions issue, cannot become root

2017-08-11 Thread prakash ranjan
I am also facing the same issue. tried several options but no solution. Unable to take privilege of "sudo su -". This is content of my playbook. Commented ones shows that I have tried those options. I have also tried many options with command lines. --- - hosts: all # remote_user: root #

Re: [ansible-project] Re: ansible_ssh_pass parameter with salt encrypt value of ansible_user password makes client server Unreachable on playbook run

2017-08-11 Thread Lorenzo Farinas
I found a way to generate key pair using RSA on Ansible control machine, copied the public key to the client's /.ssh/authorized_keys. When I run a playbook, it prompts me for the password I used to protect the private key. I followed the SSH Agent Forwarding with Ansible notes by configuring

Re: [ansible-project] Re: Not able to ping windows machine through Ansible (winrm using credential option as CredSSP is being used)

2017-08-11 Thread Chris
Do you need CredSSP? I would try NTLM if not. Maybe run NETSTAT see if it shows 5986 open and listening if you haven't already. You can also run winrm enumerate winrm/config/listener on the host to see if a hostname is assigned. When did you install pywinrm. If it's been a while might want

[ansible-project] ansible shell module passing backslashes with double quotes

2017-08-11 Thread Abey Thomas
Hi, I am trying to execute the command 'aws --debug waf-regional associate-web-acl --web-acl-id {{ ACLid }} --resource-arn {{ LBARN }}' via module shell or command but I am getting errors. aws command uses the boto and boto is getting requests with backslashes \"WebACLId\" instead of

Re: [ansible-project] Add conditionals to debug msg

2017-08-11 Thread Ryan
There seems to be a paste formatting issue. Under vim name and debug are in the same column. They were not when I pasted them in the last reply. On Thursday, August 10, 2017 at 11:25:52 PM UTC-7, Ryan wrote: > > > Sorry, I will attache the error next time. > > I tried indenting it to the same

Re: [ansible-project] variables defined in the Inventory

2017-08-11 Thread Kai Stian Olstad
On 11. aug. 2017 09:20, wenxing zheng wrote: Dear all, I have an inventory defined in the way below: [Group1] host1 [Group1:vars] package_name: aaa foo: bar [Group2] host1 [Group2:vars] package_name: bbb foo1: bar then I defined a playbook for the hosts with: Group2. But when I execute the

[ansible-project] How much recommanded space required for Ansible remote home directory

2017-08-11 Thread Binny
Hello, As ansible creates a temp file in its home directory on remote server while it connects to remote server. So how much recommended size is required for ansible remote home Dir. Thanks -- You received this message because you are subscribed to the Google Groups "Ansible Project" group.

Re: [ansible-project] Add conditionals to debug msg

2017-08-11 Thread Ryan
Sorry, I will attache the error next time. I tried indenting it to the same column as name and debug, but it still failed. If I change the command to something that returns a value for sel_out, the debug msg returns the expected output. The error only comes when sel_out is not defined. -

Re: [ansible-project] variables defined in the Inventory

2017-08-11 Thread wenxing zheng
Get it. Many thanks for the feedback. -- 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 group,

Re: [ansible-project] delegate_to and ansible_host

2017-08-11 Thread Vladimir-csp
All hosts are already in the inventory. The delegation breaks when ansible_host variable is given on the command line. -- 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

[ansible-project] Unable to manage snapshots for non-existing VM

2017-08-11 Thread Prabahar S
Hi Team, Can you please resolve this I got an error while I'm executing this playbook. For my play try to take VMware snapshot. It's large ESXi host center need to take some specific server snapshot Here my playbook configuration: --- - hosts: test tasks: - name: Create snapshot

[ansible-project] ansible-galaxy git clone failures

2017-08-11 Thread Prasoon Majumdar
Hello, I was trying to clone roles using ansible-galaxy cli from private repo, requirements file : working.yml - src: git+https://g...@git.xx.com/devops/ansible-role-fpm.git name: watever.fpm version: master ansible-galaxy install --role-file=ansible-galaxy.yml

Re: [ansible-project] Add conditionals to debug msg

2017-08-11 Thread Kai Stian Olstad
On 11. aug. 2017 08:25, Ryan wrote: Sorry, I will attache the error next time. But you didn't include all relevant output. I tried indenting it to the same column as name and debug, but it still failed. If I change the command to something that returns a value for sel_out, the debug msg

Re: [ansible-project] Re: New to ansible -- Looping through files with wildcards

2017-08-11 Thread Kai Stian Olstad
On 11. aug. 2017 22:59, John Harmon wrote: Trying this (which doesn't delete the lines yet) but the other problem is that the shell task is not idempotent What do you mean by "is not idempotent" it's just listing files and it need to do that every time. --- # tasks file for dns_update

[ansible-project] Re: New to ansible -- Looping through files with wildcards

2017-08-11 Thread John Harmon
Forgive me for responding to myself... I just hope that someone in the future might find this relevant/useful. added "changed_when: false" to the shell task. That took care of the idempotent issue I was seeing by overriding the change result. Still plugging away on the other issue - name:

[ansible-project] New to ansible -- Looping through files with wildcards

2017-08-11 Thread John Harmon
Hi all, I am new to ansible and am looking for some help. I don't mind finding the answer on my own; however, I could use a shove in the right direction. I need to modify some files (/etc/sysconfig/network-scripts/ifcfg-* files). I was trying to use with_fileglob (among other options), but I

[ansible-project] Re: New to ansible -- Looping through files with wildcards

2017-08-11 Thread John Harmon
Trying this (which doesn't delete the lines yet) but the other problem is that the shell task is not idempotent --- # tasks file for dns_update - name: Retrieve ifcfg files in /etc/sysconfig/network-scripts shell: ls /etc/sysconfig/network-scripts | grep ^ifcfg- register: path_files -

Re: [ansible-project] Add conditionals to debug msg

2017-08-11 Thread Ryan
I tried adding "changed_when" for when sel_out is not defined, but it gives me an error, so I am not sure how to use "changed_when" in this case. What's the correct usage? - name: Check for ECC's shell: ipmitool sel list | grep -i ecc register: sel_out changed_when:

[ansible-project] F5 Playbook to generate and upload UCS

2017-08-11 Thread Tariq Iqbal
Hello, I would like to use Ansible to create a playbook that generates and uploads the UCS to a centralized repository. What module can I use to accomplish this task? Any help in this regards will be greatly appreciated. Regards, Tariq -- You received this message because you are

Re: [ansible-project] Variables between playbooks

2017-08-11 Thread marta . albecka1
Thanks I guess I will put it into a new file. W dniu czwartek, 10 sierpnia 2017 19:35:04 UTC+2 użytkownik Kai Stian Olstad napisał: > > On 09. aug. 2017 22:56, marta.a...@gmail.com wrote: > > I have some problem and I can't figure out the answear to it. I'm > > relatively new to Ansible so

[ansible-project] run expect task in virtualenv, and not other tasks

2017-08-11 Thread John Lofgren
I'm having trouble figuring out how I can run a task with 'expect' module in a virtualenv and not have my other tasks run in that virtualenv. The only way I've found to run an expect task in a virtualenv is to set_fact ansible_python_interpreter, but once I've done that, I cannot unset it, so

[ansible-project] Re: Marshalling Cisco AireOS/WLC devices with ansible

2017-08-11 Thread John Z
Modules were commited to github in the past week that support aireos commands and aireos configuration. I've just started woking with them and have successfully run a couple commands on test WLCs. The support looks good and well integrated with the rest of ansible: persistent connections,