[ansible-project] Re: Running playbook from a cron jobs fails

2016-02-01 Thread Uwe Kruse
Hello, the problem was that i had different Versions of ansible installed on the system. One with python pip and one with apt. I removed all ansible packages and did a fresh install. Then everything was ok. Thank you, Uwe Am Dienstag, 26. Januar 2016 15:35:13 UTC+1 schrieb Uwe Kruse: > > Hello,

[ansible-project] Do I need to use Kerberos or Windows domain authentication to have Ansible manage Windows servers?

2016-02-01 Thread Kiran
I want to manage Windows servers with Ansible 1.9 running on a Linux server. I'd prefer to use a local Windows account without installing Moba SSH. I found very little documentation on how to set up Ansible with Windows servers. I have a Linux server running Ansible. I am trying to configur

[ansible-project] Struggling to make ec2_vpc Idempotent

2016-02-01 Thread Ryan Mes
down votefavorite I am creating a VPC in AWS using Ansible. The following play is run - name: create vpc with multi-az subnets ec2_vpc: region: "{{ region }}" cidr_block: "{{ vpc_cidr_block }

[ansible-project] Running ansible with inventories where hosts are overlapping

2016-02-01 Thread Ilan NG
Hi, I have several inventories i use for my different environments (test, ci, production, etc.). in my inventory files i use static IP addresses as hosts (this is required, although i'm not sure it matters for my question) Basically my inventory would look like this [child1] ip1 [child2] ip2 [

[ansible-project] Re: Deleting a user; still being used

2016-02-01 Thread Bruno Vernay
I add this problem, I did this: - name: Remove old "pi" account hosts: qemu become: yes become_method: sudo gather_facts: false tasks: - name : Kill all "pi" user's processes and remove the account shell : "killall -KILL -u pi ; userdel -fr pi" # Didn't work, "...cannot open

[ansible-project] Ansible 2 doesn't show what a task does without "name:". Can I get the old behavior back (like in Ansible 1.x)?

2016-02-01 Thread Mario R
Hello In Ansible 1.x a line like this: - lineinfile: dest=/root/.bashrc regexp="^export VISUAL=" line="export VISUAL='vim'" Gives the following output when I execute the playbook: TASK: [lineinfile dest=/root/.bashrc regexp="^export VISUAL=" line="export VISUAL='vim'"] *** ok: [xy] However, w

Re: [ansible-project] Re: Deleting a user; still being used

2016-02-01 Thread Bruno Vernay
I *had* not *add* !! sorry -- 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: Do I need to use Kerberos or Windows domain authentication to have Ansible manage Windows servers?

2016-02-01 Thread J Hawkesworth
Hello, No you don't need to use kerberos to control a windows machine, unless you are trying to use a domain user to connect. To start with I suggest you set things up as described here - http://docs.ansible.com/ansible/intro_windows.html#inventory with a windows group in your inventory and th

[ansible-project] Re: Dynamically set /etc/hosts using ansible_interfaces

2016-02-01 Thread Dayton Jones
Final solution: {% for interface in ansible_interfaces if interface != 'lo' %}{{ hostvars[inventory_hostname]['ansible_' + interface]['ipv4']['address'] }} {{ lookup('dig', hostvars[inventory_hostname]['ansible_' + interface]['ipv4']['address'] + '/PTR').rstrip('.') }} {{ lookup('dig', hostvar

Re: [ansible-project] Re: ansible-pull git failures on initial clone and when repo changes.

2016-02-01 Thread Brian Coca
This is 'fixed' in current devel, we were improperly passing this info to the ansible call that cloned the repo, it should only have been passed to the ansible-playbook task that actually used it. -- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ans

Re: [ansible-project] Running ansible with inventories where hosts are overlapping

2016-02-01 Thread Brian Coca
Use aliases in the inventory and set ansible_ssh_host to the actual IP, ansible uniques on 'inventory_hostname' so you can point at the same host more than once as long as it has different names. -- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansi

Re: [ansible-project] Ansible 2 doesn't show what a task does without "name:". Can I get the old behavior back (like in Ansible 1.x)?

2016-02-01 Thread Brian Coca
short answer: no longer answer: Ansible pre 1.8 templated names and that behavior is back in 2.0 (it was a bug that it did not work in 1.8/1.9), this plus the usage of secrets in some tasks would accidentally disclose information onto the screen most users want to keep private. So we decided to c

[ansible-project] Transform a json list

2016-02-01 Thread Yoel
Hi, my variable contains this Json "grafana_datasources.json": [ { "access": "proxy", "basicAuth": false, "basicAuthPassword": "", "basicAuthUser": "", "database": "databaseName", "id

Re: [ansible-project] Is it possible to run playbook with wildcard tags

2016-02-01 Thread Brian Coca
no On Sun, Jan 31, 2016 at 12:05 PM, 张斌 wrote: > > Is it possible to run playbook with wildcard tags ? > > for example: > > ansible-playbook ... playbook.yml --tags db_* > > which expects db_* matches db_install, db_configure etc. > > thanks > > -- > You received this message becau

[ansible-project] YUM module Install loop too clever

2016-02-01 Thread Arthur Francis
Does anybody know if it is possible to make the yum module a little bit dumber and stop it from merging packages in one request? I am trying to install open-vm-tools and open-vm-tools-deploypkg on a centos vm, playbook snippet below. - name: Install Standard Packages yum: state=pre

[ansible-project] Ansible OS provisioning for AIX

2016-02-01 Thread SM1986
Is there the ability to provision AIX with Ansible. If so, is there any blog/run-through that can walk me through it? Appreciate it, SM -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving email

Re: [ansible-project] Ansible OS provisioning for AIX

2016-02-01 Thread Brian Coca
Not sure what you mean by 'provision' or in what context, but there are a few AIX and Ansible users out there, I am not aware of any docs though. -- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group

[ansible-project] Re: Ansible OS provisioning for AIX

2016-02-01 Thread SM1986
On Monday, February 1, 2016 at 10:11:59 AM UTC-6, SM1986 wrote: > > Is there the ability to provision (DEPLOY) AIX OS with Ansible. If so, is > there any blog/run-through that can walk me through it? > > Appreciate it, > > SM > -- You received this message because you are subscribed to the Go

[ansible-project] Re: Ansible OS provisioning for AIX

2016-02-01 Thread SM1986
In other words, I'm wondering can I create an AIX operating system / deploy it 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+

Re: [ansible-project] Re: Ansible OS provisioning for AIX

2016-02-01 Thread Brian Coca
probably ... again, not sure of in what context, 'create an AIX operating system' does not tell me much -- 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

Re: [ansible-project] Is it possible to run playbook with wildcard tags

2016-02-01 Thread Alex Leonhardt
I guess there could be a somewhat more helpful answer to this? Maybe it's worth a feature request? Alex On 1 Feb 2016 3:47 p.m., "Brian Coca" wrote: > no > > On Sun, Jan 31, 2016 at 12:05 PM, 张斌 wrote: > > > > Is it possible to run playbook with wildcard tags ? > > > > for example: > > > >

[ansible-project] Assemble module - local src file not found

2016-02-01 Thread Arthur Francis
Hi All, I am experimenting with the Assemble module to join two files together but not having much luck: --- - hosts: testhosts2 sudo: yes tasks: - name: Test Task assemble: src=common/new.file dest=/etc/test.file remote_src=false I added the *remot

[ansible-project] ansible --version and pip list

2016-02-01 Thread Michael Baydoun
Both report ansible 2.0.0.0 no matter what 2.x version I really have installed, 2.0.0.0-1, 2.0.0.2, doesn't matter. Is this an error with ansible, or an error on the part of the pip packager? -- You received this message because you are subscribed to the Google Groups "Ansible Project" group.

[ansible-project] Can't Reference Array Variables

2016-02-01 Thread jordantkj
Hi, I am trying to reference elements in the "from" array from using the following Jinja2 structure. What I want to do is create a separate line for each of the "from" terms. *firewall: filters:- name: protect-re family: inet terms: - name: accept

Re: [ansible-project] Re: Ansible OS provisioning for AIX

2016-02-01 Thread Michael Shulman
There would be nothing stopping you from using ansible to ssh to an hmc and carve an lpar, and then start a nim push and then netboot the lpar. I'm not aware of any ansible specific docs on this On Feb 1, 2016 8:28 AM, "Brian Coca" wrote: > probably ... again, not sure of in what context, 'creat

[ansible-project] Delegate_to fails if host is referenced by non-inventory name

2016-02-01 Thread Andrew Davison
I'm not sure if this is a bug in Ansible 2.0.0.2 or an intended change in behaviour, so I'm asking here before filing any bug report :) *Ansible version:* ansible 2.0.0.2 config file = /etc/ansible/ansible.cfg configured module search path = Default w/o overrides *Ansible configuration:* De

Re: [ansible-project] Transform a json list

2016-02-01 Thread Matt Martz
You should be able to do: {{ grafana_datasources.json|map(attribute='name') }} On Mon, Feb 1, 2016 at 9:20 AM, Yoel wrote: > Hi, > > my variable contains this Json > > > "grafana_datasources.json": [ > { > "access": "proxy", > "basicAuth": false, >

Re: [ansible-project] Re: Ansible OS provisioning for AIX

2016-02-01 Thread mirkaleem
Hello Brian, So basically as you create server in Amazon using Ansible we would like to create a server or atleast deploy the operating system using Ansible. On Monday, February 1, 2016 at 10:28:26 AM UTC-6, Brian Coca wrote: > > probably ... again, not sure of in what context, 'create an AIX >

[ansible-project] ERROR! need more than 2 values to unpack while using ansible commands

2016-02-01 Thread bryan . yu
Upgraded to Ansible 2.0.0.2 via brew and can't run any of the core ansible commands on OSX. > ansible localhost -m ping - Using /Users/bryanyu/Projects/data-repo/ansible/ansible.cfg as config file ERROR! need more than 2 values to unpack I am not using any spaces in my group names. (#13917

Re: [ansible-project] Delegate_to fails if host is referenced by non-inventory name

2016-02-01 Thread Brian Coca
since box2 does not have an inventory reference it is not picking up the need to login as vagrant user, does setting `remote_user: vagrant` fix this? -- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this

Re: [ansible-project] YUM module Install loop too clever

2016-02-01 Thread Brian Coca
in 2.0 you can set ANSIBLE_SQUASH_ACTIONS env var or squash_actions in ansible.cfg to not include the yum module (default is "apt, dnf, package, pkgng, yum, zypper"). Just note that now you'll be running 1 task per item vs all items in 1 shot and will be much slower. -- Brian Coca -- You rec

Re: [ansible-project] YUM module Install loop too clever

2016-02-01 Thread Josh Smift
If you know that you have one particular page that needs to go first, and you know what it is, you could just create a second task (to run first) to install that package, and then a second task to install all the rest, right? -Josh (j...@care.com) This

[ansible-project] bigip_virtual_server

2016-02-01 Thread Heinrich Piard
I managed to use all bigip functionality (adding nodes, pools etc.) via ansible. However, when I try to create a virtual server it is throwing an exception and I am not sure how to resolve it. ansible-playbook playbooks/bigip_f5/f5-create-vs.yml

Re: [ansible-project] bigip_virtual_server

2016-02-01 Thread Tim
Hey Heinrich, Which version of ansible are you using? We added a certificate validation parameter that is likely causing that exception, but would like to know which ansible version is in use. -tim On Feb 1, 2016 11:12 AM, "Heinrich Piard" wrote: > I managed to use all bigip functionality (addi

[ansible-project] Re: bigip_virtual_server

2016-02-01 Thread Heinrich Piard
I am using ansible version 2.0.0.2 hpiard@parker:~/PycharmProjects/ansible_idms_dev$ ansible --version ansible 2.0.0.2

[ansible-project] Re: bigip_virtual_server

2016-02-01 Thread Heinrich Piard
Here is my playbook: - hosts: henrysf5ltm connection: local tasks: - name: Create Virtual Server CustomerA local_action: module: bigip_virtual_server server: henrysf5ltm user: ansible password: ansible state: present partition: Common name: Web_

Re: [ansible-project] Re: bigip_virtual_server

2016-02-01 Thread Tim
Lemme take a look here and will figure out what is amiss On Feb 1, 2016 11:28 AM, "Heinrich Piard" wrote: > I am using ansible version 2.0.0.2 > > hpiard@parker:~/PycharmProjects/ansible_idms_dev$ ansible --version > > > > ansible 2.0.0.2 > > > > config file = /home/hpiard/PycharmProjects/ansib

[ansible-project] Cloudformation module does not read the template file with .json extension

2016-02-01 Thread Bhotu
I am working with the following script and I have got an error. Saying that your file is not found. Although my file is already there. What could be the possible problem ? Script: . cas_cloud.yml -- --- - name: Create Cloudformation Template for Cassandra Servers h

Re: [ansible-project] Re: bigip_virtual_server

2016-02-01 Thread Tim
Looks like a bug. I will open a ticket and send in a fix for it. If you're interested, we can fix it offline in your install too until the next official release. -tim Lemme take a look here and will figure out what is amiss On Feb 1, 2016 11:28 AM, "Heinrich Piard" wrote: > I am using ansible v

[ansible-project] Re: bigip_virtual_server

2016-02-01 Thread Heinrich Piard
Hi Tim, it would be wonderful if you could help me to get this fixed until new release. On Monday, February 1, 2016 at 2:11:56 PM UTC-5, Heinrich Piard wrote: > > I managed to use all bigip functionality (adding nodes, pools etc.) via > ansible. However, when I try to create a virtual server it

Re: [ansible-project] Cloudformation module does not read the template file with .json extension

2016-02-01 Thread Brian Coca
where is the file cassandra.json? what directory and which machine (the one executing ansible or the target)? also note that: command: "echo /Users/suthata/Downloads/playbooks/ansible/cassandra.json" does not test that the file is there, it just prints out the path. -- Brian Coca -- You

Re: [ansible-project] Cloudformation module does not read the template file with .json extension

2016-02-01 Thread Bhotu
Hi Brian, I have tried the "cassandra.json" file with the following paths: /Users/suthata/Downloads/playbooks/ansible/cassandra.json and /Users/suthata/Downloads/playbooks/cassandra.json...Still no directory found error. I am running ansible on following path: /Users/suthata/Downloads/playboo

Re: [ansible-project] Cloudformation module does not read the template file with .json extension

2016-02-01 Thread Brian Coca
you did not respond the other 1/2 of the question, is the file on the machine you are executing ansible on or on the 'target'? On Mon, Feb 1, 2016 at 3:52 PM, Bhotu wrote: > Hi Brian, > > I have tried the "cassandra.json" file with the following paths: > > /Users/suthata/Downloads/playbooks/ansi

Re: [ansible-project] Cloudformation module does not read the template file with .json extension

2016-02-01 Thread Bhotu
I am executing the cloud formation template file on the remote machine or i want to implement all the resource on the remote machine from the template itself. It has to be on the local side. ( the template ).. On Monday, 1 February 2016 13:31:41 UTC-8, Brian Coca wrote: > > you did not respond t

Re: [ansible-project] Cloudformation module does not read the template file with .json extension

2016-02-01 Thread Bhotu
I am executing the cloud formation template file on the remote machine or i want to implement all the resource on the remote machine from the template itself. Path I have set up is on the local side and it will implement it on the remote side. On Monday, 1 February 2016 13:31:41 UTC-8, Brian

Re: [ansible-project] Cloudformation module does not read the template file with .json extension

2016-02-01 Thread Brian Coca
that is your problem, the module executes on the remote machine, the file is not there, you can either make it a 'local_action' as this is an API call and should work from any machine. But if you need to run it from THAT specific machine you'll need to copy the file to it first. -- Brian Coca

Re: [ansible-project] Cloudformation module does not read the template file with .json extension

2016-02-01 Thread Bhotu
Here I have modified. Now getting some other error. --- - name: Create Cloudformation Template for Cassandra Servers hosts: awsserver sudo: yes gather_facts: no tasks: - name: Cloudformation | Use the module cloudformation local_action: module: cloudformation

Re: [ansible-project] Cloudformation module does not read the template file with .json extension

2016-02-01 Thread Bhotu
Here I have modified. Now getting some other error. --- - name: Create Cloudformation Template for Cassandra Servers hosts: awsserver sudo: yes gather_facts: no tasks: - name: Cloudformation | Use the module cloudformation local_action: module: cloudformation

Re: [ansible-project] Cloudformation module does not read the template file with .json extension

2016-02-01 Thread Brian Coca
That seems to be an issue with cloud authentication, are you setup on the machine you run ansible from? -- 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

Re: [ansible-project] Cloudformation module does not read the template file with .json extension

2016-02-01 Thread Bhotu
Yes. I have exported the environment variable AWS_ACCESS_KEY and AWS_SECRET_ACCESS_KEY for my remote AWS machine. Earlier it was "boto" error. Now it is showing the credential error. What could be the possible problem ? On Monday, 1 February 2016 14:15:24 UTC-8, Brian Coca wrote: > > That seem

Re: [ansible-project] Re: Ansible OS provisioning for AIX

2016-02-01 Thread mirkaleem
Thank you Michael will try that. Thanks Kaleem Mir On Monday, February 1, 2016 at 11:34:16 AM UTC-6, Michael Shulman wrote: > > There would be nothing stopping you from using ansible to ssh to an hmc > and carve an lpar, and then start a nim push and then netboot the lpar. > I'm not aware of a

[ansible-project] ansible_distribution_major_version on the CLI

2016-02-01 Thread Reece Webb
Greets, Hopefully this is a ridiculously simple question... I'm trying to put together a one-liner (# ansible all -m copy...) that will copy a file to a linux host only if the OS is a specific version... RHEL7, for example, skipping any RHEL5. "ansible_distribution_major_version" seems to be t

Re: [ansible-project] Cloudformation module does not read the template file with .json extension

2016-02-01 Thread Brian Coca
if you export them on the remote machine, you won't have them on the local one boto is a required library for the module and MUST be present on the machine you execute the module on. There are always 2 machines involved with ansible tasks, the machine you run 'ansible' on and the machine that run

Re: [ansible-project] ansible_distribution_major_version on the CLI

2016-02-01 Thread Brian Coca
Your problem here is that the adhoc command only runs a single task, so you cannot run 'setup' (what runs when you gather_facts) to get the info you need, also adhoc tasks do not have a way to add a when: condition. You need a playbook. -- Brian Coca -- You received this message because you ar

[ansible-project] galaxy support for fedora 23 as a supported OS config in meta/main.yml

2016-02-01 Thread Andrew Rothstein
the galaxy doesn't seem to like declaring that my role works on Fedora 23 in meta/main.yml. It's fine with 22 and 21. Can 23 please be white listed? -Andrew -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and

Re: [ansible-project] Cloudformation module does not read the template file with .json extension

2016-02-01 Thread Bhotu
Perfect. Now its done it successfully. Thanks for your help. Really appreciate... On Monday, 1 February 2016 14:59:16 UTC-8, Brian Coca wrote: > > if you export them on the remote machine, you won't have them on the local > one > > boto is a required library for the module and MUST be prese

[ansible-project] win_template Illegal characters in path

2016-02-01 Thread Joe Levis
Not sure what I'm doing wrong here. I've tried all different styles of configuration with no success. I'm trying to templatize a config file on a Windows Server 2012 R2, but it's throwing the below error: *"failed": true, "invocation": {"module_args": {"dest": "C:\temp\test.conf", "src": "templ

[ansible-project] Using "when" with dependent roles

2016-02-01 Thread Andrew Martin
Hello, I recently upgraded to Ansible 2.0 and have noticed a change in behavior with how dependent roles in meta/main.yml are executed. For example: dependencies: - { role: role1, when: trigger } - { role: role2, when: not trigger } In Ansible 1.9, I could set trigger == True or trigger == Fal

[ansible-project] Evaluate variable immediately, save for later

2016-02-01 Thread Colin Byrne
Hey, so I have the following sequence where I first register a variable, then want to evaluate stats from it later but I want the stats from when the variable was first created. What is the best way to do this? I could see registering a second variable immedeatly that evaulates properties of t

[ansible-project] inserting JSON blob into ec2 user_data

2016-02-01 Thread christopherlove68
I'm developing a playbook with Ansible 2.0 where I want to insert a blob of JSON data (read from a file) into the user_data segment of an EC2 instance. The task looks like this: - name: Create Instance local_action: module: ec2 region: "{{ aws_region }}" keypair: "{{ key_na

[ansible-project] Re: Struggling to make ec2_vpc Idempotent

2016-02-01 Thread Arbab Nazar
can you please check this, I hope it will help you. https://github.com/arbabnazar/ansible-aws-roles/blob/master/roles/vpc/tasks/main.yml#L3 On Monday, February 1, 2016 at 6:19:10 PM UTC+5, Ryan Mes wrote: > > > > > down votefavorite >