[ansible-project] Re: "Start in" field for win_shortcut

2018-01-16 Thread 'J Hawkesworth' via Ansible Project
Glad you have it working. Out of interest, yes win_shortcut.ps1 is the right file. I would recommend getting yourself a windows virtual machine or two to try things out against. I just use virtualbox, others prefer using vagrant. There are tools around like packer that you can use to spin up w

[ansible-project] Re: JMESPath-like expression to traverse Ansible variables

2018-01-16 Thread 'J Hawkesworth' via Ansible Project
You need to use the json_query filter (and install jmespath module on your ansible controller machine) if you want to use JMESPath filtering. See http://docs.ansible.com/ansible/latest/playbooks_filters.html#json-query-filter There's an example there that looks fairly similar to what you are t

[ansible-project] Help for Windows 7H target

2018-01-16 Thread Luigi Votta
Hello I am using Ansible on Ubuntu 16.04, as controller, to manage a W7 Home machine, as target. All prerequisities are stisfied, running configureRemotingForAnsible.ps1. When I run this command ansible windows -m win_ping - I obtain the followings: Using /home/luigi/ansible/an

[ansible-project] Help for Windows 7H target

2018-01-16 Thread Luigi Votta
My mistake, sorry. IP Address failure -- 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, sen

[ansible-project] Re: JMESPath-like expression to traverse Ansible variables

2018-01-16 Thread Manfredi Giordano
Hello Jon, Thanks for your answer. I hoped to be able to do it without `json_query` (and thus without `jmespath`), but I don't think it's possible. Il giorno martedì 16 gennaio 2018 09:12:34 UTC+1, J Hawkesworth ha scritto: > > You need to use the json_query filter (and install jmespath module o

[ansible-project] Using YAML anchors in host_vars that are defined in group_vars

2018-01-16 Thread bretgiddings
Hello, I'm trying to create some snippets of configuration data that is to be shared between two servers so that various different tunnel configs can be kept in one place. So, I was hoping to have something like the following defined in group_vars/all --- shared: host1_host2: &host1_host2

[ansible-project] Re: variable inside regex_search inside a variable :)

2018-01-16 Thread Marian Vasile Caraiman
I'm working in a similar task and what worked for me was this trick : 1. create a variable : vars: prefix="192" - name: Make the regexp variable set_fact: term="^{{prefix}}.*" 2. use the "prepared variable" - name: Get ip4 address of the server set_fact: matches=

[ansible-project] Re: Get all groups from parent group

2018-01-16 Thread starflighter . one
Any Updates here? :-( I still need something like this... Am Dienstag, 12. Dezember 2017 10:39:45 UTC+1 schrieb starflig...@t-online.de: > > Hi guys, > > I want to get all existent subgroups from a parent group. > > Example Playbook: > > --- > - hosts: "test" > > tasks: > - group_by: >

[ansible-project] nxos_acl module

2018-01-16 Thread Julien Guirlinger
Hello, Does anybody use ansible to manage ACL on Cisco Nexus switches ? I have started to use, but i face some issues : - I didn't find a way to set the "per entry statistics on my ACL" - I have to call the module for each ACE in my ACL, which is not satisfying for performance and for readabili

Re: [ansible-project] Using YAML anchors in host_vars that are defined in group_vars

2018-01-16 Thread Matt Martz
YAML anchors and aliases, must exist in the same file, they cannot span multiple files, as the ref/deref happens on per file parsing. On Tue, Jan 16, 2018 at 5:11 AM, wrote: > Hello, > > I'm trying to create some snippets of configuration data that is to be > shared between two servers so that v

[ansible-project] What's-up with docker-py? Has anyone got ansible to docker working on Mac?

2018-01-16 Thread Jéan Roux
Hi all, I am new here I fell in love with Ansible to control docker, but after 2 months of time invested, I have very little to show for it, but really want to get this working. I have a Mac, the "Controller", and RPi's - the TARGET host. I want to pull images, build images, start containe

Re: [ansible-project] ansible question

2018-01-16 Thread Kai Stian Olstad
On Monday, 15 January 2018 20.23.35 CET rajesh wrote: > May be this question is so basic, frustrating me not in any document > explains this scenario. advance thanks for your help . > > Ansible not loading the become_user profile . this may look like small > issue but i want to run some scri

[ansible-project] Ansible - "pyvmomi module required" error

2018-01-16 Thread ludmilmm
When I add the following section to otherwise working ansible playbook: - name: Revert to a snapshot vmware_guest_snapshot: hostname: myvcenter username: myusername password: mypassword datacenter: myvcenter folder: myfolder name: guestname

Re: [ansible-project] Ansible - "pyvmomi module required" error

2018-01-16 Thread Matt Martz
pyvmomi needs to be installed where the module is executing, per your output, it is failing to import pyvmomi on `x.x.x.x` (which is of course some obscured host) You likely want to use `delegate_to: localhost` on that task to have ansible execute the module locally, instead of on a remote host.

Re: [ansible-project] Ansible - "pyvmomi module required" error

2018-01-16 Thread Kai Stian Olstad
On Tuesday, 16 January 2018 20.29.43 CET ludmi...@gmail.com wrote: > When I add the following section to otherwise working ansible playbook: > > - name: Revert to a snapshot > vmware_guest_snapshot: > hostname: myvcenter > username: myusername > password: mypassword >

Re: [ansible-project] Ansible - AWS - Security Group

2018-01-16 Thread Pshem Kowalczyk
It seems like you have any tasks in your playbook. Could you show the content of the playbook? kind regards Pshem On Tue, 16 Jan 2018 at 16:58 Reddy Myyb wrote: > Hi Pshem, > I have made it as a task and able to run. The play runs successfully, but > I can't see the security group in my aws co

[ansible-project] Re: Idempotent fetching of files by URL

2018-01-16 Thread Josh Smift
It turns out that unarchive with a .zip file basically works -- except that on our Ubuntu 16.04 systems, for some reason, it deals with timezones in some bizarre way that I can try explain but won't bother unless anyone really wants to know. As long as the zip files were built in the same timez

Re: [ansible-project] Re: apt module is reinstalling the same .deb file on every single run of a playbook

2018-01-16 Thread David Reagan
Thanks. # python -c "import apt;print apt.Cache()['duplicati'].installed.version" > 2.0.1.73-1 > # dpkg --field duplicati.deb Version > 2.0.1.73-1 > I am seriously mystified. What in the world is going on on my servers that could cause the version check to fail??? If those commands are the co

[ansible-project] Combine ansible-vault with prompted variables?

2018-01-16 Thread eric . b . hymowitz
The problem I have right now is that, to use ansible-vault encrypted strings, I need to specify on the command line --vault-id=foo@prompt . I don't use encrypted strings very often, so I'd rather have my play notice that I'm going to use an encrypted string, and prompt for the password only whe

Re: [ansible-project] Ansible - "pyvmomi module required" error

2018-01-16 Thread Ludmil Miltchev
Thanks, Matt! I will give it a try. On Jan 16, 2018 1:36 PM, "Matt Martz" wrote: > pyvmomi needs to be installed where the module is executing, per your > output, it is failing to import pyvmomi on `x.x.x.x` (which is of course > some obscured host) > > You likely want to use `delegate_to: local

[ansible-project] jenkins ansible template

2018-01-16 Thread Sudhir Kumar
Hi, i am trying to add multiple sudoers line with template. so, i am passing sudoers=abc,def within jenkins and use -e (extended vars) while running playbook in template: {% for item in sudoers %} {{ item }} ALL=(ALL) NOPASSWD:ALL {% endfor %} yml files looks like : - name: sudoers file

Re: [ansible-project] jenkins ansible template

2018-01-16 Thread Pshem Kowalczyk
Your 'sudoer' is a string, you want the with_items to iterate over a list. Try this: with_items: "{{ sudoers.split(',') }}" kind regards Pshem On Wed, 17 Jan 2018 at 12:00 Sudhir Kumar wrote: > Hi, > > i am trying to add multiple sudoers line with template. > > so, i am passing sudoers=abc,de

Re: [ansible-project] jenkins ansible template

2018-01-16 Thread Sudhir Kumar
Thanks Pshem but i am still getting same result. Regards, Sudhir On Wednesday, January 17, 2018 at 12:15:59 AM UTC+1, Pshem Kowalczyk wrote: > > Your 'sudoer' is a string, you want the with_items to iterate over a list. > Try this: > > with_items: "{{ sudoers.split(',') }}" > > kind regards > Ps

Re: [ansible-project] jenkins ansible template

2018-01-16 Thread Pshem Kowalczyk
I just realised you have in fact two loops in there - one in the task (with_items) and one in the template (for). I think the easiest way is to drop the with_items and use the one inside the template: {% for item in sudoers.split(',' %} kind regards Pshem On Wed, 17 Jan 2018 at 12:32 Sudhir Ku

Re: [ansible-project] jenkins ansible template

2018-01-16 Thread Sudhir Kumar
Yeah, just did this and it worked : Great. thanks. Regards, Sudhir On Wednesday, January 17, 2018 at 12:49:16 AM UTC+1, Pshem Kowalczyk wrote: > > I just realised you have in fact two loops in there - one in the task > (with_items) and one in the template (for). I think the easiest way is to >

Re: [ansible-project] Ansible - AWS - Security Group

2018-01-16 Thread Reddy Myyb
Hi Pshem, Please find below the content of my playbook. --- - hosts: localhost become: yes become_method: sudo vars_files: - ec2-vars/sam.yml roles: - { role: security } Below is my role. - name: Bstar ec2 group - ec2_group: name: bright_pedda description: an ex

Re: [ansible-project] Ansible - AWS - Security Group

2018-01-16 Thread Pshem Kowalczyk
Hi, Firstly - please regenerate access keys used for that account, as now the whole internet can access your account. Secondly - can you run the playbook with -vv to see what's actually going on. kind regards Pshem On Wed, 17 Jan 2018 at 14:08 Reddy Myyb wrote: > Hi Pshem, > Please find bel

Re: [ansible-project] Ansible - AWS - Security Group

2018-01-16 Thread Reddy Myyb
I regret the previous post ! In the first post I edited the access keys ! On Wednesday, 17 January 2018 14:38:34 UTC+11, Pshem Kowalczyk wrote: > > Hi, > > Firstly - please regenerate access keys used for that account, as now the > whole internet can access your account. > > Secondly - can you ru

[ansible-project] “Invalid credentials Error” in Ansible win_share when we create the File share permission by using our domain account

2018-01-16 Thread edwinkamal
I create app server and install the software using temp username and password in winrm host file.After setup I run the script userdataapp.ps1 to join the machine to XE domain. After that I create Fileshare and adding XE email account and service account in the Fileshare Permission section. Whe

[ansible-project] Re: “Invalid credentials Error” in Ansible win_share when we create the File share permission by using our domain account

2018-01-16 Thread edwinkamal
I am attaching the screenshot On Wednesday, January 17, 2018 at 9:46:12 AM UTC+5:30, edwin...@gmail.com wrote: > > I create app server and install the

[ansible-project] delegate_to hanging

2018-01-16 Thread Gopi Krishna
Hi, my playbook file: - hosts: oraclesource[0] tasks: - name: Copy Remote-To-Remote (from serverA to serverB) synchronize: src=/root/gopi dest=/root/gopi delegate_to: "{{groups['oraclesource'][1]}}" my hosts file: [oraclesource] xx.xx.xx.xx xx.xx.xx.xx while i'm running the abov