[ansible-project] Re: But in iptables module?

2016-03-19 Thread Dejay Clayton
Looks like a bug to me. -- 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, send email to

[ansible-project] Re: How to pass command line arg as input for dynamic-inventory executable program during ansible-playbook launch

2016-03-19 Thread Dejay Clayton
What operating system are you using to execute ansible-playbook? > > > -- 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] Does this Ansible feature make sense to anyone at all?

2016-03-19 Thread Dejay Clayton
I'm really puzzled by how a certain Ansible feature appears to work, and I can't figure out why anyone in the world would ever want it to work that way. I hope that I'm just densely mis-interpreting how it works. It seems that the *when:* attribute for the *include:* task doesn't actually

Re: [ansible-project] Hail Marry - Ansible - Open Stack

2016-03-19 Thread John Favorite
Here is an example that works for me: - name: launch compute instance hosts: localhost vars: auth_url: "http://controller:35357/v2.0/; username: password: project: image: CentOS-7-x86_64-GenericCloud-1601 key: somekey timeout: 200 flavor: m1.small

[ansible-project] Ansible synchronize not using the right user

2016-03-19 Thread Chechu Santander
hey guys, I'm trying to use synchronize module on Ansible, my inventory file has set the ssh_user and ssh_password...and it works, but with synchronize uses the user of my laptop to connnect no the one from the inventory, also it asks for the password... any idea? thanks -- You received

[ansible-project] upgrading to ansible 2 mishaps

2016-03-19 Thread William Muriithi
Hi, I just updated from ansible 1.9 to ansible 2 and I am somehow managed to break my playbooks. I can't seem to figure how whats wrong even after spending a good chunk of time with google Any pointer on what could be wrong below: [wmuriithi@dazzler ansible]$ ansible-playbook -s

[ansible-project] Is there anyway to consolidate these set_fact tasks?

2016-03-19 Thread Michael Baydoun
- name: create all vpc's for all accounts and regions ec2_vpc: state: "{{ item.internet_gateway | default('no') }}" region: "{{ item.region }}" state: "{{ item.state | default('present') }}" cidr_block: "{{ item.cidr_block }}" resource_tags: "{{ item.resource_tags }}"

[ansible-project] Clone a vm from Template

2016-03-19 Thread Budur Nagaraju
HI I have a Ansible play book below is the one ,when I execute the script its not allowing as cluster name is not mentioned in the playbook, is it mandatory that cluster is required ? to ignore what can I do ? - hosts: 127.0.0.1 gather_facts: false connection: local user: remote sudo:

[ansible-project] csvfile lookup plugin with a space-delimited file

2016-03-19 Thread Anand Buddhdev
Hello Ansible folk, I have a text file of the form: 10.60.43.23 worker22.domain I was to use the "csvfile" lookup plugin to look up name host name, given an IP address. So I'm trying this: - name: hostname lookup debug: msg: hostname is {{

[ansible-project] Re: check if a (file or directory) symbolic links exists on a windows file system with the help of win_file

2016-03-19 Thread ishan jain
Thanks for the answer. I figured i should always quote and use double slashes to be on safe side. I am still stuck with problem number 3. can you help me with that ? On Thursday, 17 March 2016 15:37:15 UTC+5:30, J Hawkesworth wrote: > > I don't have any experience of using symlinks on windows,

Re: [ansible-project] How to pass command line arg as input for dynamic-inventory executable program during ansible-playbook launch

2016-03-19 Thread Brian Coca
there is no way to do what you ask, options for dynamic inventory are set either in configuration files or environment variables. -- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop

[ansible-project] localhost for limited roles while still using hosts:all for the rest

2016-03-19 Thread Daniel Boland
I have a playbook that will update the local source code for my web project and then it will deploy it to remote servers. Everything works when i run it locally on OS X, but when i try to run from the deployment server (aws linux) I get no matching host errors I'm a little confused at why it

[ansible-project] How to pass command line arg as input for dynamic-inventory executable program during ansible-playbook launch

2016-03-19 Thread Naren
dynamic inventory can be achieved by ansible-playbook -i dynamicInventory.py myplaybook.yml in case I need to pass some dynamic input to the dynamicInventory.py program itself, how can I do that. Command line argument is not working when it coupled with ansible-playbook command Any

[ansible-project] Ansible 2.0 playbook with python scripts.

2016-03-19 Thread techbayboy
Is there a way to trigger the playbook within a python script? -- 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: Ansible 2.0 VMWare modules

2016-03-19 Thread jonathan frappier
In any case, thank you so much for looking into it. I'll keep an eye on the PR to see when it is merged. On Wed, Mar 16, 2016 at 8:49 AM, wrote: > I had the same thing on my mind this morning, but I'm not certain if this > is a pyvmomi issue. > > Kamil > > On

Re: [ansible-project] Re: Ansible 2.0 VMWare modules

2016-03-19 Thread kamil . szczygiel
I had the same thing on my mind this morning, but I'm not certain if this is a pyvmomi issue. Kamil On Wednesday, March 16, 2016 at 1:10:02 PM UTC+1, Jonathan Frappier wrote: > > Thanks, look forward to testing. As I sit here now, I also wonder if this > is a pyVmomi specific issue... > On

[ansible-project] How to retrieve a specific result from multiple command registered to a variable

2016-03-19 Thread Arthur Reyes
I have a series of commands registered to the same var - shell: ls -alh'{{ item }}' register:cmd_output with_items: - '/home/1' - '/home/2' For some plays, I only need to evaluate a specific stdout. Assuming I want to the results of 'ls -alh /home/2', my current method is to loop through

Re: [ansible-project] module lineinfile not found in configured module paths. Additionally, core modules are missing. If this is a checkout, run 'git submodule update --init --recursive' to correct th

2016-03-19 Thread Brian Coca
it is either a misconfiguration or a bad install. -- 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: os_network module and changing project names not working

2016-03-19 Thread Michael Gale
Thanks for the info, I am looking forward to that change :) Currently I am making it work via the following method: --snip-- - name: Creating Project Networks os_network: name: "{{ item.0.name }}_{{ item.1.network.name }}" state: "{{ item.0.state }}" shared: False external:

[ansible-project] Hail Marry - Ansible - Open Stack

2016-03-19 Thread David Biglin
Hi all, Sorry if this is in the wrong area for posting however I have been struggling for a while with this issue. I am trying to use Ansible to build a VM environment on an OpenStack based Hypervisor. I have used Ansible in the past to configure VMs once they have been configured. I have

[ansible-project] Jobs concurrency - Ansible Tower

2016-03-19 Thread a akin
Jobs scheduled via Ansible Tower are sometimes backlogged for as much as 3 days and it appears only one job is being run at any one time. Any suggestions on how to change this and make jobs run concurrently? This document -

[ansible-project] Re: My first "role" isn't running

2016-03-19 Thread Gilberto Valentin
Ok, if I change my vars main.yml From --- # vars file for app_install test: "{{ testservers }}" To --- # vars file for app_install test: "testservers" ...I get the following: Sudo password: PLAY [install app and join appropriate ou] ** TASK [setup]

[ansible-project] vsphere_guest Deploy from Template with OS Customizations

2016-03-19 Thread Jarryd Took
Hi All, This may be a feature request given the current 2.0 release, but I was wondering if there's a way we can configure a OS Customization when deploying from template? I know the backend makes use of Pysphere to interact with Vsphere. Is it possible for Ansible to support the OS

[ansible-project] Re: Ansible 2.0 playbook with python scripts.

2016-03-19 Thread techbayboy
There is an updated blogs for Ansible 2.0 https://serversforhackers.com/running-ansible-2-programmatically On Thursday, March 17, 2016 at 10:03:14 AM UTC-7, Michael Luich wrote: > > I found this blog helpful. > > https://serversforhackers.com/running-ansible-programmatically > > On Thursday,

Re: [ansible-project] How to retrieve a specific result from multiple command registered to a variable

2016-03-19 Thread Arthur Reyes
For anyone looking for a solution. Given this code - shell: ls -alh'{{ item }}' register:cmd_output with_items: - '/home/1' - '/home/2' I can retrieve the stdout of a specific command without looping through cmd_output, like so: - debug: msg: '{{ cmd_output.results | selectattr("cmd",

Re: [ansible-project] Questions about sudo password accepted with -K argument

2016-03-19 Thread John Leo Huetter
Thanks! On Wednesday, March 16, 2016, Brian Coca wrote: > It is in memory until the playbook end, it gets passed to remote hosts > under the connection (which is encrypted) when prompted for. > > It should not be written to disk in any circumstance > > > -- > Brian

Re: [ansible-project] when: state is present from variable dict hash list

2016-03-19 Thread 'Chris Short' via Ansible Project
Thank you, bcoca. Helpful as always! On Friday, March 18, 2016 at 9:48:22 AM UTC-4, Brian Coca wrote: > > you are referencing it incorrectly, staff is a list not a dictionary, also > I think you want the "current item's state": > > when: item.state == 'present' > > assuming you want to execute

[ansible-project] Re: Move a file on the remote host

2016-03-19 Thread vitaly bichov
I'm looking for the same functionality. For some reason the guys from ansible refuse to implement such module (all solutions suggest using a shell module). Any idea why is that? On Sunday, February 16, 2014 at 8:23:42 PM UTC+2, Romain Nio wrote: > > Hi, > > I looking for a very simple action :

Re: [ansible-project] Playbooks in subdirectories

2016-03-19 Thread Benjamin Redling
Hi Max, On 2016-03-19 04:34, Max Kraszewski wrote: > [...] but I'd like a little more organization > So I decided to create a *playbooks* folder and move them in some > subdirectories inside. Isn't a vast number of tasks in the project's main folder a sign that you aren't using roles enough? >

[ansible-project] Re: My first "role" isn't running

2016-03-19 Thread Mike Biancaniello
Or ... your problem could be that you don't have a group defined as "testservers". Only "testsystems". -- 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] Telnet

2016-03-19 Thread Vivek Raj
Can any one say how to do telnet using ansible -- 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

Re: [ansible-project] when: state is present from variable dict hash list

2016-03-19 Thread Brian Coca
you are referencing it incorrectly, staff is a list not a dictionary, also I think you want the "current item's state": when: item.state == 'present' assuming you want to execute the task only for those entries that have that state. -- Brian Coca -- You received this message because

Re: [ansible-project] accessing localhost with dynamic hosts for limited tasks

2016-03-19 Thread Brian Coca
remove the -l from your command line, since you are not passing a limit. -- 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] bug: ssh_extra_args allows only one option

2016-03-19 Thread alexk4work
Hi all, I'm trying to pass a couple of command line keys thru ssh_extra_args and it seems to me that there's a very annoying limitation: only one key can be passed because of apostrophs around the value of this parameter. This is the ssh command generated by ansible: <172.17.24.7> SSH: EXEC

[ansible-project] Re: Galaxy - Install Role from Subdirectory of Github Repo

2016-03-19 Thread Franklin Wise
Chris - that makes sense. However, there's another use case where the support would be helpful. Which is keeping the ansible role in the same repo as the application it installs. So if I have github.com/myuser/mycoolapi.git I might want to keep the ansible role in a folder within the same

Re: [ansible-project] Ansible2 in stable repo

2016-03-19 Thread Andreas Olsson
lör 2016-03-19 klockan 05:51 -0700 skrev George Khan: > I ask it jan 18, and ask after 2 month: Any news about ansible2 in > debian8/centos7 _stable_ repo? :) I wouldn't keep my hopes up about seeing ansible 2.x in the regular Jessie repositories. That because of Debian's general policy about

[ansible-project] Sample skeleton for Ansible module written in Perl -- how should I contribute?

2016-03-19 Thread Uditha Desilva
Hi, being a hardened Perl coder and Python novice, I prefer to use Perl to write my modules. I've gotten a simple skeleton that I use for this, that uses the auto-replacer code with the magic JSON string ("<>") and parses it (... probably) by transforming the JSON into a Perl datastructure,

[ansible-project] variable for list of targetted hosts

2016-03-19 Thread jocelyn gibart
Hello dear Ansible wizards Is there a way to get the list of targetted hosts for a playbook or for a role ? I didnt find any variable or any way to get this. What I'm looking for is not merely the hosts: value, it is the intersection of hosts values and -l ( --limit ) option. Thank you --

Re: [ansible-project] Re: My first "role" isn't running

2016-03-19 Thread Gilberto Valentin
I can't put this up on github. I had to sanitize it a lot just to get it here too :/. If the structure is wrong, then I am not sure what should be changed. I got that structure initially by running *ansible-galaxy init role_name* and have modified the structure here and there based on

Re: [ansible-project] Is there anyway to consolidate these set_fact tasks?

2016-03-19 Thread Stephen Granger
Yes, but it is also possible to lookup the VPC id. This just gets the default, based on the filters, VPC id. # Get the vpc id - name: Get the default VPCs details ec2_vpc_net_facts: aws_access_key: "{{ aws_access_key }}" aws_secret_key: "{{ aws_secret_key }}"

Re: [ansible-project] Ansible2 in stable repo

2016-03-19 Thread Brian Coca
​That question is probably better targeted at the package maintainers, the Ansible project has very little control over the package availability for each distro. We are on friendly terms with some of them but each distro/repo has it's own process.​ -- Brian Coca -- You received this

[ansible-project] Re: csvfile lookup plugin with a space-delimited file

2016-03-19 Thread Uditha Desilva
Here's what I suggest for your case: - name: hostname lookup debug: msg: "hostname is {{ item }}" with_lines: "awk '$1==\"{{ansible_default_ipv4['address']}}\"{print $2;exit}' hostnames.hdp1" changed_when: false On Friday, 18 March 2016 20:00:14 UTC, Uditha Desilva wrote: >

Re: [ansible-project] Is there anyway to consolidate these set_fact tasks?

2016-03-19 Thread Stephen Granger
Have you looked at the Ansible 2.0 modules for deploying a VPC and subnets? It may simplify the setting of facts. I don't have time to give you an example at the moment but have found the new modules a lot easier to use. http://docs.ansible.com/ansible/ec2_vpc_net_module.html On 16 March 2016 at

Re: [ansible-project] Parse error

2016-03-19 Thread Brian Coca
Your play is incorrectly formatted, should be like: - hosts: all tasks: - debug: msg=onetask On Fri, Mar 18, 2016 at 2:18 AM, chinky gupta wrote: > Parse error: playbooks must be formatted as a YAML list, got > > What could be the reasons of such error > > -- > You

Re: [ansible-project] Ansible 2.0 playbook with python scripts.

2016-03-19 Thread Brian Coca
http://docs.ansible.com/ansible/developing_api.html On Tue, Mar 15, 2016 at 12:33 PM, wrote: > Is there a way to trigger the playbook within a python script? > > -- > You received this message because you are subscribed to the Google Groups > "Ansible Project" group. > To

Re: [ansible-project] [gluster_volume] Can't set options for a gluster volume

2016-03-19 Thread Brian Coca
You are mixing YAML and key=val notations, that does not work. gluster_volume: state: present name: hosted_engine options: group: virt -- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from

[ansible-project] Re: Hail Marry - Ansible - Open Stack

2016-03-19 Thread John Barker
Hi, You may find something useful here https://github.com/openstack/openstack-ansible Regards, John Barker On Friday, 18 March 2016 20:00:12 UTC, David Biglin wrote: > > Hi all, > > Sorry if this is in the wrong area for posting however I have been > struggling for a while with this issue. > >

[ansible-project] Re: My first "role" isn't running

2016-03-19 Thread Gilberto Valentin
Hi Arthur, can you elaborate on exporting ANSIBLE_INVENTORY? All I did was call my inventory file like this: *ansible-playbook -i server_hosts app_install_main.yml* Thanks for the quick response :) On Thursday, March 17, 2016 at 8:26:17 PM UTC-4, Arthur Reyes wrote: > > Just a thought. Did you

Re: [ansible-project] When conditional can be used with variables??

2016-03-19 Thread Arthur Reyes
Rereading the porting to 2.0 guide, there are a number of instances where bare variables do produce warnings of future deprecation, but when conditions are not mentioned there. Apologies for any confusion I may have caused. -- You received this message because you are subscribed to the

[ansible-project] From salt to ansible

2016-03-19 Thread Thomas Güttler
During the last weeks I played around with salt-stack. Salt reminds me of the programming language "prolog" we learned at university. Yes, I can think that way. But I am unsure if I want to think that way. My brains somehow prefers the step1, step2,

[ansible-project] Global name 'module" is not defined after upgrading to Ansible 2.0

2016-03-19 Thread Samnang Sen
Works fine w/ Ansible 1.9.4 I won't paste the whole file because it's not getting past the setup stage. With gather_facts turned off I can get past the setup phase but it obvioulsy fails once it gets to the pre_tasks block. Error: TASK [setup]

Re: [ansible-project] Questions about sudo password accepted with -K argument

2016-03-19 Thread Brian Coca
It is in memory until the playbook end, it gets passed to remote hosts under the connection (which is encrypted) when prompted for. It should not be written to disk in any circumstance -- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansible

Re: [ansible-project] Sample skeleton for Ansible module written in Perl -- how should I contribute?

2016-03-19 Thread Uditha Desilva
I did try that a while ago but it just didn't work for me. The key difference, as far as I am concerned, is that my method allows the module (in the Ansible sense) to be pushed to all client systems just as the ones bundled with Ansible are, and will actually work on machines from RHEL5

[ansible-project] Re: My first "role" isn't running

2016-03-19 Thread Gilberto Valentin
Mike, And then in my app_install_main.yml, I have the following: --- - name: install app and join systems to domain hosts: "{{ test }}" become: yes roles: - app_install vars_prompt: - name: "ansible_sudo_pass" prompt: "Sudo password" private: yes -- You received this

Re: [ansible-project] hosts in ansible-pull working only for 127.0.0.1

2016-03-19 Thread Govindaraj Venkatesan
Hi All, I am facing the same issue as "no hosts matched" and the ansible-pull is taking only localhost. It is not able to see any of my hosts. I also Here is how i am using the command ansible-pull -U g...@github.com:XPlat/caps-sps.git -d /home/gvenka008c/caps-sps jenkins_mesos_icinga.yml -i

[ansible-project] Re: Provisioning OpenStack with Ansible from scratch, missing modules?

2016-03-19 Thread Thiago Martins
Sounds awesome David! I'm very interested in OpenStack Ansible native modules... Thanks! On Monday, March 14, 2016 at 10:34:46 AM UTC-3, David Shrewsbury wrote: > > We are continually working on adding new modules. Some exist as PRs right > now and will hopefully show up > in the Ansible 2.1

Re: [ansible-project] Re: Ansible 2.0 VMWare modules

2016-03-19 Thread Kamil Szczygieł
If you'd like to try it out ASAP, my fork is up to date with ansible main devel. Kamil On Wednesday, March 16, 2016 at 2:01:49 PM UTC+1, Jonathan Frappier wrote: > > In any case, thank you so much for looking into it. I'll keep an eye on > the PR to see when it is merged. > > On Wed, Mar 16,

[ansible-project] Correct way to reduce useless information

2016-03-19 Thread Dejay Clayton
Hi, I'm wondering if the latest version of Ansible allows developers to reduce the amount of useless information that is displayed while running playbooks. For example, a *reasonable* way to code the "fail" module is to not display a bunch of useless "TASK [fail] skipping" output for tasks

[ansible-project] Parse error

2016-03-19 Thread chinky gupta
Parse error: playbooks must be formatted as a YAML list, got What could be the reasons of such error -- 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

Re: [ansible-project] Re: My first "role" isn't running

2016-03-19 Thread Dick Davies
Is there any way to put this up as e.g. a github repo? I'm pretty sure your layout is wrong but it's hard to keep track of what's where without having it to hand. On 18 March 2016 at 19:01, Gilberto Valentin wrote: > Mike, > > I got a bit further with your suggestion. I

Re: [ansible-project] Global name 'module" is not defined after upgrading to Ansible 2.0

2016-03-19 Thread Toshio Kuratomi
This looks like you updated the main ansible from the git repo by not the modules. The combination of the devel branch git repo and old modules will give you this error. We have some instructions about running from a git checkout here:

[ansible-project] Re: Dynamically alter remote_tmp

2016-03-19 Thread chris scott
-e "ANSIBLE_REMOTE_TEMP=/cedar/" and -e "remote_tmp=/cedar/" ive also done the following in the play and the role environment: remote_tmp=/cedar/.tmp ANSIBLE_REMOTE_TEMP=/cedar/.tmp Both modules still write to ~/.ansible/tmp as their tmp dir though -- You received this

[ansible-project] Check existence and state of a service on windows machine using win_service

2016-03-19 Thread ishan jain
I am trying to provision windows server 2012 R2 machine with ansible and for that i need to gather some custom facts about the running services. I tried getting the information via the win_service module like this: --- - hosts: windows tasks: - name: check services win_service:

[ansible-project] Re: os_network module and changing project names not working

2016-03-19 Thread David Shrewsbury
What you're trying to do is not currently supported, but lucky for you, a community member has already been working on this: https://github.com/ansible/ansible-modules-core/pull/3236 This also requires a new release of the shade library to support the new project parameter. On Thursday, March

[ansible-project] Re: My first "role" isn't running

2016-03-19 Thread Gilberto Valentin
Hi Arthur, Actually, I do have my app_install as a sub directory under roles. It's just that initially I only pasted everything within roles and only showing you that. Here's a better view: ~/git/ansible/roles$ tree . └── project1 ├── server_hosts ├── app_install │ ├── README.md

[ansible-project] SSH connection to host failed..

2016-03-19 Thread Andrzej K
Hello Guys, Can someone of you help me with this strange case? I have host running CentOS 6.7 x86_64. My ansible management host is CentOS 7.2 x86_64, ansible version 1.9.4. When I try to run playbook against my host I'm getting this message: GATHERING FACTS

Re: [ansible-project] How to retrieve a specific result from multiple command registered to a variable

2016-03-19 Thread Arthur Reyes
I think that's the clue I was looking for. I'll post a result tomorrow for others who come here looking for the same answer. -- 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,

[ansible-project] Re: My first "role" isn't running

2016-03-19 Thread Arthur Reyes
It looks like your directory structure isn't quite right. app_install should be a sub directory under roles, which might explain why your playbook never finds vars/main.yml. -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe

Re: [ansible-project] Ansible2 in stable repo

2016-03-19 Thread Vincent Van der Kussen
Working on the CentOS part https://wiki.centos.org/SpecialInterestGroup/ConfigManagementSIG On Sat, Mar 19, 2016 at 1:51 PM, George Khan wrote: > Hi all! > I ask it jan 18, and ask after 2 month: Any news about ansible2 in > debian8/centos7 _stable_ repo? :) > > P.S.

[ansible-project] Ansible2 in stable repo

2016-03-19 Thread George Khan
Hi all! I ask it jan 18, and ask after 2 month: Any news about ansible2 in debian8/centos7 _stable_ repo? :) P.S. Yep, i know about install ansible from git/pip/testing-repo. This question not about it ^_^ -- Best regards, Me. -- You received this message because you are subscribed to the

[ansible-project] Re: check if a (file or directory) symbolic links exists on a windows file system with the help of win_file

2016-03-19 Thread 'J Hawkesworth' via Ansible Project
I don't have any experience of using symlinks on windows, but my advice for construction windows paths (assuming you are using ansible 2.0 or later) is... 1/ If you need to double quote your path names, then always use double backslash for the path separator So win_stat:

[ansible-project] [gluster_volume] Can't set options for a gluster volume

2016-03-19 Thread royal . forest . dept
Hi, I'm trying to set an option for a gluster volume with this task: - name: Include hosted_engine volume in virt group gluster_volume: state=present name=hosted_engine options='{group: virt}' run_once: true The format is from the 2nd example of gluster_volume module

Re: [ansible-project] Jobs concurrency - Ansible Tower

2016-03-19 Thread Brian Coca
For Ansible Tower support email supp...@ansible.com or go to http://support.ansible.com -- 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

[ansible-project] Re: csvfile lookup plugin with a space-delimited file

2016-03-19 Thread Uditha Desilva
Check that your file is sorted, and doesn't have any blank lines. Similar issues led me to abandon that and use an awk invocation via "with_lines:" to pull the data out that I needed. On Thursday, 17 March 2016 01:29:40 UTC, Anand Buddhdev wrote: > > Hello Ansible folk, > > I have a text file

[ansible-project] Change in delgate_to Behaviour after upgrade to Ansible 2.0.1.0

2016-03-19 Thread Jon B
Hi, I have had a playbook in production that uses a pre_tasks section that removes a server from load balancers before deploying updated code. It was working fine under ansible 1.9.4 however after upgrading to ansible 2.0.1.0 the pretasks are carried out twice on one of the loadbalancers. I

Re: [ansible-project] Re: How to force creating a new ssh connection

2016-03-19 Thread Brian Coca
you can run a command to kill the connection locally: ssh -O stop -o ControlPath=~/.ansible/cp/ansible-ssh--22- -- 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

[ansible-project] EC2 instance + AMI + group vars

2016-03-19 Thread Michal Medvecky
Hello, I have 2 different environments, staging + production. For both of them I need to create AMIs with my services. For both, I have existing stopped EC2 instances that I need to start within the playbook, then run tasks on this machine, then stop the machine and create AMI. My problem is

Re: [ansible-project] How to trace/debug Ansible EC2 ?

2016-03-19 Thread James Cammarata
Since the ec2 modules use boto, which doesn't really execute commands, your best bet is to run your playbook with the environment variable ANSIBLE_KEEP_REMOTE_FILES=1 set, and with -vvv. This will allow you to examine the modules left on the target system (most likely localhost) and run them

[ansible-project] Dynamically alter remote_tmp

2016-03-19 Thread chris scott
I have a simple problem. I'm pushing up a tarball with the unarchive module, and the dest setting is pointing to a large volume. However it unarchive module pushes the file to the remote_tmp dir 1st. This is on /home be default, however /home isnt big enough to take the tarball on the system

Re: [ansible-project] sudo permissions with apt module

2016-03-19 Thread Johannes Kastl
Am 19.03.16 schrieb Brian Coca: > ansible is not using those commands and will not work with restricted sudo > in that way, it needs full sudo to accomplish these tasks. Most of the work > of the apt module is using the apt-python API. So either change your permissions on the system or use the

Re: [ansible-project] Ansible 2.0 VMWare modules

2016-03-19 Thread Ben Lutgens
That would be fantastic. I think there's a great deal of people using self-signed certs with vsphere. On Friday, January 15, 2016 at 12:25:42 AM UTC-6, Brian Coca wrote: > > we should add validate_certs=yes|no option as we do in other modules. > > On Fri, Jan 15, 2016 at 1:09 AM, Larry Smith

[ansible-project] how to replace windows style line endings with linux in the replace task?

2016-03-19 Thread Vikram Kone
I tried this, but doesnt seem to work - name: Fix line endings from CRLF to LF local_action: replace dest={{my_dir}}/conf/{{item}} regexp='\r\n' replace='\n' -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group

[ansible-project] Re: My first "role" isn't running

2016-03-19 Thread Uditha Desilva
Unless I've missed something, I can't see where your top-level "app_install_main.yml" play is expecting to get "test" from -- it needs to know the list of hosts to work with before it starts opening up the roles, and it doesn't import those variables from anywhere itself? As far as I know, a

Re: [ansible-project] How to retrieve a specific result from multiple command registered to a variable

2016-03-19 Thread Arthur Reyes
You aren't wrong. But having spent a number of years sharing systems with Perl developers who also had sudo priviledges, makes me loathed to make changes to global packages. It's just been better, in my experience, to isolate your environment when your needs start to diverge from the standard

[ansible-project] Ansible synchronize

2016-03-19 Thread Chechu Santander
hey guys, when I run synchronize it always run with the user from my localhost where I launch the playbook, not the one specified on the hosts file (inventory)...so it asks for password...but the user is wrong any idea? thanks in advance -- You received this message because you are

[ansible-project] restart docker when mounted file changes

2016-03-19 Thread Koen Janssens
Hi, I have an ansible tasklist that generates a cfg file from a template first and then starts a docker container using that cfg file as a volume. Works fine. But when the generated cfg file changes (cfg file is actually generated from ansible inventory) , the docker container is not

[ansible-project] Re: restart docker when mounted file changes

2016-03-19 Thread Uditha Desilva
Changing "state: restarted" (rather than reloaded) might be enough -- otherwise try adding a "notify" to the task that is creating the config file, and a "handler" to explicitly stop and then start the container. On Friday, 18 March 2016 20:00:15 UTC, Koen Janssens wrote: > > Hi, > > I have an

[ansible-project] Ansible 2.0 changes in variables scoping in playbooks

2016-03-19 Thread Simon Lipp
Hello, I’m in the process of migrating my playbooks to Ansible 2.0, and I’m quite distressed by changes in variable scoping with Ansible 1.9. Let’s take this simple setup : https://gist.github.com/sloonz/7144dde17b3bb013f357 In summary, we have : - a role, profile, which is "intended" to

[ansible-project] issue using become (to sudo su - msp" - Pl Help

2016-03-19 Thread Srinivas Kuncham
Hi All, I am facing issues with being able to login with my credentials and then sudo (become) msp user.. When I manually ssh to the test_server, I use the command "sudo su - msp" to switch user and run few commands. But it doesnt seem to be working with ansibal. Can someone please help?

[ansible-project] Re: Check existence and state of a service on windows machine using win_service

2016-03-19 Thread 'J Hawkesworth' via Ansible Project
You could run a raw powershell command like Get-Service nameOfService -ErrorAction SilentlyContinue and then register the result, then check You would need the '-ErrorAction SilentlyContinue' bit otherwise when the service doesn't exist, Get-Service will fail. also if you prefer you could do

[ansible-project] Re: win_file module unable to delete directory symbolic links present inside a target dir

2016-03-19 Thread ishan jain
Still haven't figured out the solution. Need help here... On Tuesday, 8 March 2016 15:54:53 UTC+5:30, ishan jain wrote: > > I am trying to delete a parent dir with lots of stuff inside with the help > of win_file: > > - name: remove all > win_file: path="E:\root" state=absent > > This folder

Re: [ansible-project] How to retrieve a specific result from multiple command registered to a variable

2016-03-19 Thread Brian Coca
no, but you can use map/select filters to loop over it instead of a `with_` -- 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: My first "role" isn't running

2016-03-19 Thread Gilberto Valentin
Mike and Uditha, Ok, I see what you guys are saying about the hosts. I moved it one level up and now we are getting somewhere. Now, the issue is that it can't run my task because it doesn't see the value of my conditional. For example, I want my task to run *when: "{{ testserver }}"*. In other

[ansible-project] Re: ESX Setting Guest IP address

2016-03-19 Thread tsdrach
Hi Gerhard, There are Customization Specifications in Vsphere. When you deploying VM, you can use your specification with pre-configured IP (not only IP but full static network config). It works if Vmware tools installed in the template. You can deploy VM with necessary specification directly

Re: [ansible-project] Telnet

2016-03-19 Thread James Cammarata
You cannot at this time. If someone REALLY wanted to, you could write your own connection plugin for this, however I seriously recommend against doing so. James Cammarata Ansible Lead/Sr. Principal Software Engineer Ansible by Red Hat twitter: @thejimic, github: jimi-c On Wed, Mar 16, 2016 at

Re: [ansible-project] Telnet

2016-03-19 Thread Benjamin Redling
On 03/16/2016 19:48, Vivek Raj wrote: > Can any one say how to do telnet using ansible If you just want to use telnet to check a service you could do something like this: # req. ansible 2.0, python >=2.6, pexpect >= 3.3 --- - hosts: 127.0.0.1 connection: local tasks: # if cmk -d from

[ansible-project] New "dense" stdout callback plugin needs testers

2016-03-19 Thread Dag Wieers
Hi, I wrote a new stdout callback plugin, named "dense", with the aim to make the output more compact and readable, while valuing screen-estate . During a playbook-run progress is updated using terminal capabilities. Successful tasks disappear from screen, but if changes or errors occur,

Re: [ansible-project] When conditional can be used with variables??

2016-03-19 Thread Brian Coca
you are misinformed -- 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+unsubscr...@googlegroups.com. To post to this

[ansible-project] Re: My first "role" isn't running

2016-03-19 Thread Mike Biancaniello
Overall, you are better off customizing your plays for each group (maybe in separate playbooks) instead of trying to make a one-size-fits-all playbook. Tasks can be reused by either importing them or putting them in roles. The other nice thing about this model is that when you run

Re: [ansible-project] When conditional can be used with variables??

2016-03-19 Thread Brian Coca
you are writing your conditionals wrong, vars don't need {{}} and strings need quoting: when: was == 'jboss' On Wed, Mar 16, 2016 at 8:23 PM, NEW HOMIE wrote: > Hello there~ > Is this possible using when conditional with variables? > > For instance, I use two kind of

  1   2   >