[ansible-project] Assing tag to vmware VM

2018-10-03 Thread MIke Drtikol
Hi, is there a way to assing tag to vmware vm please ? Thx Mike -- 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.

Re: [ansible-project] Re: Unable to remove user accounts from Cisco switches running IOS 12.x with Ansible module ios_user:

2018-10-03 Thread Brad Van Orden
Hi Andy, Understandable. Can you accomplish your task using shell or command module? Maybe use the expect module to switch to enable mode, then shell or command from there to achieve your task? Regards, Brad On Wednesday, October 3, 2018 at 2:31:18 AM UTC-4, Andy Lemin wrote: > Morning Bra

[ansible-project] Re: PATH env

2018-10-03 Thread Brad Van Orden
There are several. File module as Kuldip suggested. lineinfile is another. replace is another. Your best bet is to change /etc/profile. Easiest way is to copy and edit as how you want. Place in your files directory and then just use the copy module to copy it to the target systems. That

[ansible-project] Re: ansible fetch fails but creates zero-length file

2018-10-03 Thread Brad Van Orden
Eric, Can you provide your task? Any error messages? On Tuesday, October 2, 2018 at 1:45:38 PM UTC-4, eric.b@nasa.gov wrote: > When I use the fetch module (with or without using become, which is > contra-indicated but I have no choice), and for whatever reason the file > cannot be copied,

RE: [ansible-project] Re: ansible fetch fails but creates zero-length file

2018-10-03 Thread 'Hymowitz, Eric B. (GSFC-444.0)[KBRwyle]' via Ansible Project
I made a mistake – it’s not “for whatever reason the file cannot be copied” ... but it happens (at least) when I can’t open the remote file (permission denied). [ehymowitz test]$ ls -al cougar total 8,192 drwx--. 2 ehymowitz ehymowitz 4,096 Oct 3 13:15 . drwx--. 3 ehymowitz ehymowitz 4,

[ansible-project] Re: Looking for playbook to Find and Copy recently modified file from remote machine folder to folder

2018-10-03 Thread Deepan M
Anyone can able to help me. Thanks, Deepan M On Wednesday, October 3, 2018 at 11:10:22 AM UTC+5:30, Deepan M wrote: > > Hello, > > I'm writing a playbook for patching and in that i required 2 modules to > Find and Copy the recently modified file in remote machine , I have tried > with below m

[ansible-project] Re: ansible fetch fails but creates zero-length file

2018-10-03 Thread Brad Van Orden
I think not using become is what is killing you. iptables is definitely only readable by root. Try turning "become" back on. On Tuesday, October 2, 2018 at 1:45:38 PM UTC-4, eric.b@nasa.gov wrote: > > When I use the fetch module (with or without using become, which is > contra-indicated bu

RE: [ansible-project] Re: ansible fetch fails but creates zero-length file

2018-10-03 Thread 'Hymowitz, Eric B. (GSFC-444.0)[KBRwyle]' via Ansible Project
My problem isn’t “the file didn’t copy”. I know why the file didn’t copy. The question is, why did a zero-length destination file appear when the file didn’t copy? If the file didn’t copy, then my destination should not exist. --EbH From: ansible-project@googlegroups.com On Behalf Of Brad V

[ansible-project] Re: ansible fetch fails but creates zero-length file

2018-10-03 Thread Brad Van Orden
Not necessarily. Depends on the order of execution within the module. It might "touch" the destination before attempting the copy and may not delete it if the copy fails. Not sure. You'd have to look at the source code of the fetch module. :) On Tuesday, October 2, 2018 at 1:45:38 PM UTC-4

[ansible-project] Having a hard time developing hosts file

2018-10-03 Thread Laurent Walker
Below is part of the yaml host file I am trying to complete. I am having issues targeting specific groups. Most work when using ios modules but then when I use aireos modules it just skips right over and says nothing was found. Am I creating this host file correctly? Is there a better way of do

Re: [ansible-project] Having a hard time developing hosts file

2018-10-03 Thread Brian Coca
First, you don't seem to have any hosts defined, that is why nothing can be matched, you are only creating groups. Another thing i would point out is that 'groups are always global' so any host or group relationship defined in one place affects the same group, so voice/wan only need to be defined

[ansible-project] Re: Disk informatoin in target machine

2018-10-03 Thread vinod93pop
O hoo, OMG, kai you are really great. thanks for supporting. @ban thanks a lot for your time: you both made my day On Sunday, September 30, 2018 at 4:57:12 PM UTC+2, vinod...@gmail.com wrote: > HI all, > > I am trying to get the disk information of target machine. > >

Re: [ansible-project] Re: Unable to remove user accounts from Cisco switches running IOS 12.x with Ansible module ios_user:

2018-10-03 Thread Andy Lemin
Hi Brad, Thanks for the reply. Good reminder about the ‘shell’ method.. However I am trying to be strict about code quality and where complex logic resides. For example Ansible is a nice clean framework, for automating complex but repeatable actions/logic. The ‘shell’ method however would be b

Re: [ansible-project] Having a hard time developing hosts file

2018-10-03 Thread Laurent Walker
Hi Brian, Thank you for your quick reply. I removed the hosts when I posted it. Can you provide an example? regards, Vince On Wednesday, October 3, 2018 at 10:52:30 AM UTC-4, Brian Coca wrote: > > First, you don't seem to have any hosts defined, that is why nothing > can be matched, you are o

Re: [ansible-project] Having a hard time developing hosts file

2018-10-03 Thread Laurent Walker
If they are also global Routers > WAN/Voice how will i mark a host that is in a different region as voice and in usen or uscl. On Wednesday, October 3, 2018 at 11:46:00 AM UTC-4, Laurent Walker wrote: > > Hi Brian, > > Thank you for your quick reply. I removed the hosts when I posted it. Can >

[ansible-project] Re: Unable to remove user accounts from Cisco switches running IOS 12.x with Ansible module ios_user:

2018-10-03 Thread Brad Van Orden
No, darn it. I forgot those modules expect python on the target. So, expect, command, shell, etc won't work. I think what you want to do is something like (I don't have any way to test this at the moment): --- - name: enable-mode ios_command: commands: - command: enable pr

Re: [ansible-project] Having a hard time developing hosts file

2018-10-03 Thread Brian Coca
i'm unsure of what you are trying to do, but a host is always part of all the groups it is defined in, the way you have it structured it would always be part of all 4 groups involved. -- -- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansi

Re: [ansible-project] Re: Unable to remove user accounts from Cisco switches running IOS 12.x with Ansible module ios_user:

2018-10-03 Thread Andy Lemin
Ahhh, yea.. The provider is network_cli, so paramilko.. I miss NETCONF ;) You’ve just spun another ios_* module assumption I had around :) I was under the impression that each ‘- name:’ definition was bounded with ios_. And so a subsequent ‘- name:’ stanzas would go back to their root again, a

[ansible-project] ansible-playbook shows encrypted data?

2018-10-03 Thread David Reagan
I have encrypted some of my host_vars data using ansible-vault. The data is encrypted properly. What is odd is that when I run the playbook that uses the data, the data is output, in plaintext, to the console. It does this when the task has changed, and when the task hasn't changed. Is that ex

[ansible-project] Re: PATH env

2018-10-03 Thread Jorge Duran
Thanks guys in ended up using lininfile since i just wanted it at the bottom of the profile. Including the command just incase anyone else wants to see the format. - name: Add a line to profile lineinfile: path: /etc/profile line: PATH=:$PATH On Wednesday, October 3, 2018 at 8:39:37

Re: [ansible-project] ansible-playbook shows encrypted data?

2018-10-03 Thread Kai Stian Olstad
On Thursday, 4 October 2018 01.44.16 CEST David Reagan wrote: > I have encrypted some of my host_vars data using ansible-vault. The data is > encrypted properly. What is odd is that when I run the playbook that uses > the data, the data is output, in plaintext, to the console. > > It does this

[ansible-project] Re: datacenter inventory layout recommendations

2018-10-03 Thread Thomas Stuber
Hi Jerry We are facing a similar situation. Did you find finally an answer to your question? How did you design the structure to support environments, functions and datacenters? On Thursday, March 9, 2017 at 9:01:10 AM UTC+1, je...@soundhound.com wrote: > > Hi, > We are looking at deploying ans

[ansible-project] become or sudo

2018-10-03 Thread Rajendra Rawat
Hi All, I am facing issue while installing httpd into remote server from ansible control server. I have a control machine and a webserver machine. My playbook is given below --- - hosts: xyz.com sudo: yes tasks: - name: install apache2 yum: pkg=httpd state=latest ran the playbook