Re: [ansible-project] Can't get returned IPs from EC2

2014-08-16 Thread Matthew Morgan
That was exactly my issue. Thank you very much for your help! On Saturday, August 16, 2014 4:21:14 AM UTC-3, Tomasz Kontusz wrote: > > On 16.08.2014 04:37, Matthew Morgan wrote: > > Okay, I understand that it only adds to the in-memory inventory, but > that's not really the problem I'm havin

Re: [ansible-project] with_dict and Jinja templates - Error

2014-08-16 Thread Matt Silverlock
> > Meanwhile, this looks problematic: template: src=pg_ident.conf.j2 > dest=/etc/postgresql/9.3/main/pg_ident.conf owner=postgres group=postgres > mode=0640 Why? > You're evaluating it multiple times in a loop, but there is no variable in > the destination path. The result is you've re-tem

[ansible-project] Re: win_ping not getting executed

2014-08-16 Thread Vinit Khandagle
sure let me try setting the winrm variable, I have not done that... If I am facing the issue even with that I will just paste the traceback as well. @Michael, I did a crtl-c. But let me paste the whole out put too. Thanks - Vinit On Saturday, August 16, 2014 3:55:05 AM UTC+5:30, Vinit Khandagl

[ansible-project] Re: Strategy or guides / tutorials for migrating existing LAMP websites?

2014-08-16 Thread Samuel Lampa
Thanks a lot Matt! Will look into that! Cheers // Samuel On Saturday, August 16, 2014 9:50:33 AM UTC+2, Matt Silverlock wrote: > > Look at using the synchronize module to rsync your static files from your > build/dev environment. > > Database dumps are much harder to deal with as I don't bel

Re: [ansible-project] VirtualBox module wrapper

2014-08-16 Thread Michael DeHaan
I do recognize that people often struggle with the Vagrant provisioner. I've occasionally wanted a virtualization abstraction that did not bring on the complexity of vagrant, though I think the one general theme of a vagrant file is the ability to specify a starter image to download, and then some

Re: [ansible-project] with_dict and Jinja templates - Error

2014-08-16 Thread Michael DeHaan
With dict works a little differently than with_items. with_items will return one item in the postgres_users list, one after another, if it were a list of users. postgres_users: - name: boxey db: cargo_ship Now, when using with_dict, it works differently, returning keys as item.key and va

Re: [ansible-project] Created an elasticache via Ansible - Get an Error "Use of cache security groups is not permitted in this API version for your account"

2014-08-16 Thread Michael DeHaan
This I don't know, but it seems to be coming from the AWS side of the house and not our code or boto. If no one else here knows an answer, I'd *perhaps* inquire with Amazon support if there's something different about that region. On Fri, Aug 15, 2014 at 8:03 PM, Shih Oon Liong wrote: > I wa

Re: [ansible-project] win_ping not getting executed

2014-08-16 Thread Michael DeHaan
Looks like you might have Control-C'd the system but not pasted the full traceback. Can you please paste the full output or was that it? The traceback is the most valuable part for us. Thanks! On Fri, Aug 15, 2014 at 7:27 PM, Matt Martz wrote: > Have you set ansible_connection=winrm in you

Re: [ansible-project] "invalid output"

2014-08-16 Thread Michael DeHaan
On a remote system that has not yet run this step once, do this for me. (A) checkout ansible from git (B) source ./hacking/env-setup (C) ./hacking/test-module -m yum - a "name='*' state=latest" Paste what you get back. This should help us see what was going on. On Fri, Aug 15, 2014 at 7:06

Re: [ansible-project] How to use ec2 modules user_data field?

2014-08-16 Thread Michael DeHaan
(a) can you please show the line from your playbook where you are using the user data variable? (b) with the above, how are you determining the way it fails? I.e. what does failure look like? On Fri, Aug 15, 2014 at 5:36 PM, Jonathan Nakatsui wrote: > From the ansible docs the ec2 module (

Re: [ansible-project] Templated file used as variable?

2014-08-16 Thread Michael DeHaan
Complex templates should be used for laying down files. In ansible, templates are not units of logic. Basically it makes things arcane and very difficult to trace, things are meant to be data as much as possible, and only deviate when not possible. On Fri, Aug 15, 2014 at 5:34 PM, AJ Daws wrot

Re: [ansible-project] using ansible to deploy war to stage/qa env

2014-08-16 Thread Michael DeHaan
I recommend keeping your inventory in a directory, like inventory/ and then have a inventory/production and a inventory/stage This prevents accidentally running something against both as you'll have to -i inventory/stage (unless you type -i inventory!) Usage of group_vars is then the way to orga

Re: [ansible-project] centralizing groups of groups, strategy that works for both dynamic and static inventory

2014-08-16 Thread Michael DeHaan
"I'm looking for something similar with static inventories. What I was trying to explain was I though I could combine a static host list with my rollup groups file, but only if I put each static inventory in a separate directory with a copy of rollup groups. As far as I am aware, that's the only wa

Re: [ansible-project] Role and playbook versioning

2014-08-16 Thread Michael DeHaan
Positional fields could be a problem, we already have a proposal for like 5 of them, and in different cases it's now seaming like they are in different orders. I think we need to reset here. If we're proliferating on fields, here is what I propose. * (A) continue to support the existing syntax f

Re: [ansible-project] rpm_key issue with jenkins setup -failed to parse error

2014-08-16 Thread Michael DeHaan
First, make sure you are running a recent version of Ansible. 1.7.1 is the latest. Occasionally the "you didn't supply a sudo password / you supplied a wrong sudo password" on a particular OS detection isn't perfect. If you are using sudo, and need a password, be sure to supply --ask-sudo-pass.

Re: [ansible-project] Reversed sorted inventory

2014-08-16 Thread Yorick Gersie
Thanks Michael, I'll keep an eye on the report. Op zaterdag 16 augustus 2014 16:45:55 UTC+2 schreef Michael DeHaan: > > You can follow this ticket at - > https://github.com/ansible/ansible/issues/8646 - thanks once again! > > > On Sat, Aug 16, 2014 at 10:38 AM, Michael DeHaan > wrote: > >> No,

Re: [ansible-project] Reversed sorted inventory

2014-08-16 Thread Michael DeHaan
You can follow this ticket at - https://github.com/ansible/ansible/issues/8646 - thanks once again! On Sat, Aug 16, 2014 at 10:38 AM, Michael DeHaan wrote: > No, it's definitely *not* expected, gathering facts happens in the right > order, but the hosts go backwards. > > This is a bug for sure,

Re: [ansible-project] Reversed sorted inventory

2014-08-16 Thread Michael DeHaan
No, it's definitely *not* expected, gathering facts happens in the right order, but the hosts go backwards. This is a bug for sure, and I'm filing it as a high priority item. Thanks very much for the report. On Fri, Aug 15, 2014 at 7:26 AM, Yorick Gersie wrote: > I have an issue when I wan

Re: [ansible-project] pip module installing xmlrunner for python3 fails but shell install always succeeds?

2014-08-16 Thread Michael DeHaan
Unicode bugs! Yay! What version of Ansible are you using for starters? On Fri, Aug 15, 2014 at 1:15 AM, zperry wrote: > I would like to install xmlrunner via the pip module to a KVM guest > running CentOS 6.5 with python34u installed from IUS Community repo. > > The following task include fil

Re: [ansible-project] Re: Idiomatic EC2 project structure

2014-08-16 Thread Michael DeHaan
" would also find it useful to be able to define a group as an intersection of two groups. It's something I've wanted for a while but just haven't gotten around to submitting a feature request for." This is not something we'd be interested in, most likely, as it's already doable from the host spec

Re: [ansible-project] Re: Get rid of "previous known host file not found"

2014-08-16 Thread Michael DeHaan
FYI: Expanding the temp path too early for that setting no longer happens in the latest version of Ansible. You may wish to try with 1.7.1. On Thu, Aug 14, 2014 at 10:01 PM, Ilya Ivanov wrote: > I always set ansible user in the inventory file. > > I actually narrowed down the issue. It happe

Re: [ansible-project] Git Module Repo Scheme Change?

2014-08-16 Thread Michael DeHaan
It's likely the accept_hostkey magic only is firing on the initial clone, right now the git module is *not* so good about changing the repo to a different repo, but works fine when changing the branch/tag/etc. This is more or less - https://github.com/ansible/ansible/issues/4658 - if you'd like to

Re: [ansible-project] Correct way of license file management in Ansible?

2014-08-16 Thread Michael DeHaan
This looks like an *excellent* way to do it if they are going to vary by host. On Thu, Aug 14, 2014 at 5:03 PM, Vincent Hardion wrote: > Hi, > > I want to manage the license file (the license key of proprietary > software) within Ansible for each host. > There is few resource on the web on

Re: [ansible-project] Re: User management by ansible - any ideas ?

2014-08-16 Thread Michael DeHaan
"I think I get where you are going with the idea of different plays, but they way I understand it, I would need a different play for every user that had different host/group requirements." Definitely not. This is where useful things like "with_items" come in, and you can do "with_items: myusers"

[ansible-project] VirtualBox module wrapper

2014-08-16 Thread Anatoly Mikhailov
Since I lost hope on Vagrant from high complexity to extend to Ruby syntax for VMs configuration I tried to build some simple version of VBoxManage CLI that based on .vagrant configuration (pretty weird data structure with files): https://gist.github.com/mikhailov/8104790 The misconception of

[ansible-project] with_dict and Jinja templates - Error

2014-08-16 Thread Matt Silverlock
Hi all, Trying to pull together my understanding of Jinja's looping constructs, Ansible's with_dict and from what I've seen out in the wild (i.e. on GitHub). I've taken a look around at some other examples but can't seem to adapt them to my approach (i.e. https://github.com/timmahoney/ansible

[ansible-project] Strategy or guides / tutorials for migrating existing LAMP websites?

2014-08-16 Thread Matt Silverlock
Look at using the synchronize module to rsync your static files from your build/dev environment. Database dumps are much harder to deal with as I don't believe MySQL has any sort of streaming archiving. I'd suggest using dumps and just restoring from them in your "app deploy" role. Have a ta

Re: [ansible-project] Can't get returned IPs from EC2

2014-08-16 Thread Tomasz Kontusz
On 16.08.2014 04:37, Matthew Morgan wrote: Okay, I understand that it only adds to the in-memory inventory, but that's not really the problem I'm having. The problem I'm having is I can't get the IP. What I plan to do with the IP after I get it involves provisioning those hosts. I can't pro