[ansible-project] Re: Import excel file values to ansible

2017-04-20 Thread Jordan Borean
You are probably best off using a flat text file for this as Ansible can't natively parse Excel files. A very basic (can't guarantee to work) example of using JSON for this would be JSON File: [ { "path": "HKLM:\\Software\\MyCompany", "name": "hello", "data":

[ansible-project] Re: Import excel file values to ansible

2017-04-20 Thread Suporter
any help? On Thursday, April 20, 2017 at 2:01:17 PM UTC+5:30, Suporter wrote: > > i have an excel file with 2 columns and multiple rows of data, , basically > like a key value pair, i want to import those as it is into win_Regedit for > creating registry entries, how can i do it? i want the

[ansible-project] Can we create a VM with fixed MAC address (Using ansible)

2017-04-20 Thread Sudhanshu Sharma
Can we create a VM with fixed MAC address (Using ansible). I am implementing automatic installation and regression for ad product. -- 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

Re: [ansible-project] "check_mode" without physical access to hosts

2017-04-20 Thread Brian Coca
do you just want a --sytnax-check? check_mode is not designed for this use case. I normally use 'mock inventories' when testing playbooks (they all have ansible_host point to localhost or local vms). -- Brian Coca -- You received this message because you are subscribed to the Google

[ansible-project] Re: Ansible 2.2.1.0 failing while connecting to Windows using AD credentials.

2017-04-20 Thread Matt Davis
Also, I think the EPEL packages for python kerberos and/or pywinrm may be horribly outdated (you'd think that working for Red Hat, I'd know who to bug about that, but alas...). That's the likely cause of the error messages you're seeing. Install via pip (as specified by the docs) to ensure

[ansible-project] Ansible Dynamic Inventory Python Script (gce.py,gce.ini) Not Working

2017-04-20 Thread Ned Studious
Greetings All, I'm hoping the community can help with the issue I'm experiencing. I'm attempting to setup a dynamic inventory using this doc: http://docs.ansible.com/ansible/guide_gce.html So far I'm not having any success as it seems that each error leads to another down the rabbit hole I

[ansible-project] Trouble with Dynamic Inventory (gce.py), please help

2017-04-20 Thread Ned Studious
Greetings All, I'm hoping the community can help with the issue I'm experiencing. I'm attempting to setup a dynamic inventory using this doc: http://docs.ansible.com/ansible/guide_gce.html So far I'm not having any success as it seems that each error leads to another down the rabbit hole I

[ansible-project] Re: Ansible 2.2.1.0 failing while connecting to Windows using AD credentials.

2017-04-20 Thread Jordan Borean
Looks like you are on the right track where you can get a valid Kerberos ticket using kinit but your Ansible config needs a few more settings so it runs through Kerberos. Looking at the error message it is still trying to authenticate using Basic auth "plaintext" and not Kerberos. Also

Re: [ansible-project] "check_mode" without physical access to hosts

2017-04-20 Thread Martin Dietze
Am Freitag, 21. April 2017 01:32:24 UTC+8 schrieb Brian Coca: to 'not connect' to a host, just don't include it in the target (via > hosts:/--limit or inventory). > >From this I read that there is no way to simulate a playbook against a given inventory without connecting to the inventory's

[ansible-project] Ansible 2.2.1.0 failing while connecting to Windows using AD credentials.

2017-04-20 Thread Siva-Ansile
HI Team, I have a new requirement to install an agant in 1500 windows machines, all these machine are Domain managed VMs. When i try to connect using local user, i am able to connect the windows box, But when i use AD credentials its not working. Let me share my current Setup here. Please

[ansible-project] Re: docker_login works in playbook, but not in role?

2017-04-20 Thread Bjørn Hansen
Ok, never mind, I solved it. I had failed to notice that the top level playbook had ' become: true', and so the docker_login was running as root, and not the user I was expecting. -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To

Re: [ansible-project] cannot run an ansible playbook with vsphere_guest support

2017-04-20 Thread Billy B
Hi, I am having the same problem. How can I check my module path please? thanks On Thursday, May 1, 2014 at 6:14:30 PM UTC+1, James Cammarata wrote: > > If you do the following, does it work as expected? > > - name: test vsphere > vsphere_guest: > ... > > If not, it would seem that

[ansible-project] Undefined variables, dicts, and Ansible 2.3

2017-04-20 Thread Josh Smift
Given this playbook: - hosts: localhost vars: mydict: { a: apple, b: banana } myfruit: "{{ mydict[myletter] }}" tasks: - debug: msg="My fruit is {{ myvar }}" when: myfruit is defined When run with '--extra-vars myletter=a', in both 2.2.1.0 and 2.3.0.0, it says

[ansible-project] docker_login works in playbook, but not in role?

2017-04-20 Thread Bjørn Hansen
I'm trying to use a private docker registry, and seeing some weirdness that I can't explain. Running the exact same task yaml is working as expected when I put it in a playbook and run it, but not working when running as part of a role (the task runs, but comes back with status "changed":

[ansible-project] SuSE Enterprise Linux Service Pack Migrations

2017-04-20 Thread Scott Whitehead
Hi All, Is it possible to perform service pack migration on SuSE Enterprise Linux servers using any built in Ansible modules ? For example going from SLES 11 SP3 > SP4 or SLES 12 SP1 > SP2 I see there is a zypper module for Ansible but this only really caters for updating and installing

Re: [ansible-project] When using group_vars : ValueError: dictionary update sequence element #0 has length 1; 2 is required

2017-04-20 Thread Brian Coca
vars files require that the top level is a dictionary, not a list: ``` crons: - { daily-min: "15", daily-hr: "01" } - { weekly-min: "15", weekly-hr: "03" } ``` -- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansible Project" group.

[ansible-project] Re: Is win_msi deprecated or not ?

2017-04-20 Thread Matt Davis
It's on the way to being deprecated (most likely we'll do it for real in 2.4)- win_package is the recommended replacement, but we've been holding off on "really" deprecating win_msi until we make some usability changes to win_package. The big one is that you have to look up the product ID to

[ansible-project] Re: CentOS 7 control server can't connect to Windows with kerberos

2017-04-20 Thread Matt Davis
The "connection refused" error doesn't have anything to do with Kerberos- WinRM is not answering on 5986. Have you run the ConfigureRemotingForAnsible.ps1 script on the target host (or taken manual steps) to set up an HTTPS WinRM listener? If so, I'd suspect a firewall or some other networking

Re: [ansible-project] localhost getting all variables from different groups.

2017-04-20 Thread Brian Coca
This will work: east.k.tropo.com east2.k.tropo.com k8s.int.ops.tropo.com k8s.k.dub.tropo.com test.c.tropo.com [group_vars:all] ansible_connection=local Just remember that the host is the main object for ansible plays, groups are just properties of the host and a convenient way to bulk assign

[ansible-project] When using group_vars : ValueError: dictionary update sequence element #0 has length 1; 2 is required

2017-04-20 Thread Sean McConkey
Hi, I am introducing group_vars & children in my inventory into my Ansible environment as I need to update cron-tabs for different geographical regions using templates the basics of what you can see below. When I run the playbook it produces the error as seen at the bottom. A bit of research

Re: [ansible-project] localhost getting all variables from different groups.

2017-04-20 Thread Kai Stian Olstad
On 19. april 2017 20:46, Matt Snoby wrote: Hello, I'm looking for advice on how to improve my implementation of my playbook. I know the way I have designed it is very different from the normal way of doing playbooks. I have a playbook that controls deploying configuration to 4 different

Re: [ansible-project] "check_mode" without physical access to hosts

2017-04-20 Thread Brian Coca
check mode tells the module 'not change anything', not to not execute at all, as it needs to figure out current state before it can decide if 'changed' is true or not (modules that don't support check mode exit right away). to 'not connect' to a host, just don't include it in the target (via

Re: [ansible-project] continue execution of tasks on both hosts

2017-04-20 Thread Kai Stian Olstad
On 20. april 2017 19:16, Robert Recchia wrote: I am creating a playbook that is used for multiple hosts - now this might not be the best way but I still want to figure it out. I have two hosts now one that is centos 7 and one that is in amazon ec2. Obviously one uses systemd and the other does

Re: [ansible-project] Re: optimize haproxy enable/disable backends

2017-04-20 Thread Kai Stian Olstad
On 20. april 2017 19:10, Michael Bubb wrote: Is there a better forum for questions like this? I spent a fair amount of time reading and googling before posting. I am really curious how to optimize tasks like this. Where shoudl I post this? Maybe async can be what you are looking for.

[ansible-project] continue execution of tasks on both hosts

2017-04-20 Thread Robert Recchia
I am creating a playbook that is used for multiple hosts - now this might not be the best way but I still want to figure it out. I have two hosts now one that is centos 7 and one that is in amazon ec2. Obviously one uses systemd and the other does not. All the tasks apply to both hosts

Re: [ansible-project] Can't execute 2 plays in a playbook in ansible-tower

2017-04-20 Thread Brian Coca
For tower suport pleas go to https://access.redhat.com/support/ -- 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: How to perform recursive vars[varname] expansion in template?

2017-04-20 Thread Long Vu
To help the next person, I found a work-around: use loops over a list of dict as a way to "inject" variables into the template. So I needed something like {{ vars[prefix + 'readonly_token'] }}, {{ vars[prefix + 'readwrite_token'] }}, {{ vars[prefix + 'readonly_tokensecret'] }}, {{ vars[prefix

[ansible-project] Re: optimize haproxy enable/disable backends

2017-04-20 Thread Michael Bubb
Is there a better forum for questions like this? I spent a fair amount of time reading and googling before posting. I am really curious how to optimize tasks like this. Where shoudl I post this? On Wednesday, April 19, 2017 at 5:46:12 PM UTC-4, Michael Bubb wrote: > > > Hello - > > We have

Re: [ansible-project] how to run task as unprivileged user

2017-04-20 Thread Kai Stian Olstad
On 20. april 2017 08:31, Павел Марченко wrote: Good day. I have a sudo user(user1) on the server and i need to run a task as another unprivilleged user(user2). A dont know a password for user2 and regular way to run something as user2 that login as user1 run "sudo -i", run "su user2" and run

[ansible-project] Mercurial for windows

2017-04-20 Thread Suporter
do we have any module of hg for windows in ansible..or can the hg module be used for maintaining repos in windows -- 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

Re: [ansible-project] Using Ansible for bare metal installation for linux, windows and esx

2017-04-20 Thread Benjamin Redling
Hi Dinil, On 2017-04-18 09:09, Dinil T wrote: > What I am aiming is to do remote installation for RHEL/SLES/Windows/ESX > like the way their native installation techniques of kickstart,… ie, > Single approach for remote installation via Ansible. IMO ansible is not made for (bare metal)

[ansible-project] Re: azure_rm_virtualmachine tags weirdness

2017-04-20 Thread Bjørn Hansen
As it turns out, this seems to have more to do with the fact that VM updates don't seem to work. I was able to repro this with a simpler playbook that had nothing to do with the templating: https://github.com/ansible/ansible/issues/23765 and found a similar

[ansible-project] Re: Blockinfile indentation

2017-04-20 Thread Jonathan Doig
Block indentation indicator still broken in ansible 2.3 :( Raised a new issue #23777 YAML block indentation indicator not working in Ansible 2.3.0.0 . Jonathan On Wednesday, 28 September 2016 04:40:22 UTC+10, ZillaYT wrote: > > This seems to be

[ansible-project] Can't execute 2 plays in a playbook in ansible-tower

2017-04-20 Thread nmath
Hi, I have a playbook which contains 2 plays, one for installing a server (with static IP set) and another to install & configure DNS in this server. For an example: *setupdns.yml* #play 1 *# Installation of DNS VM* *- hosts: host1* * tasks:* * - name: install DNS server* *command: >* *

[ansible-project] "check_mode" without physical access to hosts

2017-04-20 Thread Martin Dietze
In a project for which I have created an ansible-based installer the productive system is big, i.e. about 100 hosts. For organising my deployments I keep inventory files for all target systems and I make extensive use of groups. Now after a productive deployment (which I don't do personally)

[ansible-project] ansible is unable to connect to junos device

2017-04-20 Thread fatimazahra . bouhajban
Hi all, I'm new to ansible, I need to backup a junos device configuration, ###hosts [junos] aa.bb.cc.dd #playbook --- - name: Get configuration hosts: all connection: local gather_facts: no roles: - Juniper.junos tasks: - name: Getting config ... please wait

[ansible-project] how to run task as unprivileged user

2017-04-20 Thread Павел Марченко
Good day. I have a sudo user(user1) on the server and i need to run a task as another unprivilleged user(user2). A dont know a password for user2 and regular way to run something as user2 that login as user1 run "sudo -i", run "su user2" and run something else. And now a qestion, how can i do

[ansible-project] CentOS 7 control server can't connect to Windows with kerberos

2017-04-20 Thread Mark Allison
I've set up a new CentOS 7 VM and installed ansible fine and the kerberos components according to this guide https://docs.ansible.com/ansible/intro_windows.html#kerberos I've done the following: Added the ansible control server Computer account to AD. Added a test windows machine into

Re: [ansible-project] dockers module issues

2017-04-20 Thread 'Sander Smeenk' via Ansible Project
Quoting William Muriithi (william.murii...@gmail.com): > fatal: [fluorine.eng.example.com]: FAILED! => {"changed": false, "failed": > true, "msg": "Failed to import docker-py - No module named > requests.exceptions. Try `pip install docker-py`"} > > Docker-py is however already installed. [ .. ]

[ansible-project] hg username and password

2017-04-20 Thread Suporter
http://docs.ansible.com/ansible/hg_module.html How can we give the username and password for accessing the repos in hg module -- 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,

Re: [ansible-project] Ansible 2.3.0.0 privilege escalation doesn't work correct

2017-04-20 Thread Stefan Klatt
Hi Matt, thanks for this information. Version 2.3.0.0 isn't usable for me without this function. Other point I mentioned is Ansible ignores the host configuration for become and become_method if I don't set them at ansible.cfg. What about this? I thought a host variable overwrites default

[ansible-project] Re: ec2_ami launch_permissions to multiple accounts

2017-04-20 Thread Suporter
*userid seems to need square brackets, add them up and try* On Thursday, April 20, 2017 at 1:46:05 PM UTC+5:30, Shmulik Alfandari wrote: > > Hi, > > I am creating AMI in AWS using ec2_ami module. I need to create the AMI > and to give permissions to multiple accounts,however it failed. When I am

[ansible-project] Re: azure_rm_virtualmachine tags weirdness

2017-04-20 Thread mkporwit
The same vmId error came back when we tried some more tags-related things. Not sure why tags tickle it, but it seems there's an issue with how ansible calls the azure SDK (https://github.com/ansible/ansible/pull/22974). We can confirm that merging this fix resolves the issues we're having in

[ansible-project] Re: ec2_ami launch_permissions to multiple accounts

2017-04-20 Thread Shmulik Alfandari
Thanks for the answer. I've done it but I got an error: *# Create AMI* *- name: Create AMI* * local_action:* *module: ec2_ami* *instance_id: i-036c3f075aebfb3ce* *#instance_id: "{{ item.id }}"* *wait: yes* *wait_timeout: 3600* *

[ansible-project] Import excel file values to ansible

2017-04-20 Thread Suporter
i have an excel file with 2 columns and multiple rows of data, , basically like a key value pair, i want to import those as it is into win_Regedit for creating registry entries, how can i do it? i want the column1 row1 to be the name in win_regedit and column2 row1 to be the data in win_regedit

[ansible-project] Re: ec2_ami launch_permissions to multiple accounts

2017-04-20 Thread Suporter
*You can use with_items as shown below* *# Create AMI* *- name: Create AMI* * local_action:* *module: ec2_ami* *instance_id: "{{ item.id }}"* *wait: yes* *wait_timeout: 3600* *aws_access_key: "{{ AWSAccessKey }}"* *

[ansible-project] ec2_ami launch_permissions to multiple accounts

2017-04-20 Thread Shmulik Alfandari
Hi, I am creating AMI in AWS using ec2_ami module. I need to create the AMI and to give permissions to multiple accounts,however it failed. When I am doing it with one account it's ok. Below the code to create AMI with permission to 1 account which is working fine. *# Create AMI* *- name: