[ansible-project] Question about roles, handlers, variables, and scope

2014-06-03 Thread Simon Fondrie-Teitler
Hi all, In a role I have, I'm including another file in the role, and setting a variable in the include statement. Then from the included file, I'm notifying a handler in that role. Should the handler be able to access the variable in the include? Right now it does not seem to be able to. A sim

[ansible-project] Best practice for referring to other host IPs

2014-06-03 Thread Michael Mahemoff
I know this has come up before, but I've not come across a real answer for it. It's common for a given host to depend on other hosts. App servers need to know the IP of databases they consume, databases need to know IPs of app servers that will be accessing them etc etc. In Ansible, the IP of o

[ansible-project] Reusing inventory config

2014-06-03 Thread Michael Mahemoff
As I have separate "staging" and "production" inventory files, I end up duplicating some group compositions (e.g. databases:children is mysql:children and redis:children, that kind of thing). I'm wondering if there's a way to consolidate that logic, such as a directive to include a file. Or may

[ansible-project] syntax-check triggers vars_prompt

2014-06-03 Thread Jesse Keating
I'm trying to set up some simple validation tests to run on pull requests to one of our playbook repos. In doing this I've discovered that vars_prompt is still being triggered. This is blocking the --syntax-check run from completing unattended. Is this by design? Is there anybody out there work

Re: [ansible-project] how to reference metadata in rax_facts

2014-06-03 Thread Matt Martz
That issue is fixed in another pull request which is waiting to be merged: https://github.com/ansible/ansible/pull/7122 --  Matt Martz m...@sivel.net On June 3, 2014 at 6:22:59 PM, Jürgen Coetsiers (jurg...@thecreativestores.com) wrote: Matt, tx this was of great help! We saw that wen adding

Re: [ansible-project] how to reference metadata in rax_facts

2014-06-03 Thread Jürgen Coetsiers
Matt, tx this was of great help! We saw that wen adding the metadata for the LB Pools meta: RackConnectLBPool: marlintest that strangely the name that is captured by the api is: u'marlintest' and as such the rackconnect script fails. I tried putting " around it but no luck Any id

Re: [ansible-project] problem with jinja2 template accessing hostvars fields

2014-06-03 Thread Garrett Plasky
I discovered this "feature" today and found it rather perplexing. I've used the workaround of 'gather_facts: yes' to fix it in this case, but it would be nice to be able to pre-populate the hostvars array with playbook and/or command-line variables instead of having to rely on the fact gathering

Re: [ansible-project] A couple errors recently cropped up

2014-06-03 Thread Daniel W. Ottey
I copied some code from some place (which previously worked). My code does not have the word "pipe" anywhere. The only part that has "lookup" is here: - name: Configure ansible users SSH key authorized_key: user=ansible key="{{ lookup('file', '/etc/ansible/roles/common/files/ansible-id_rsa.pub

Re: [ansible-project] how to reference metadata in rax_facts

2014-06-03 Thread Matt Martz
PR has been submitted to include these examples in the Rackspace guide: https://github.com/ansible/ansible/pull/7650 On Tue, Jun 3, 2014 at 11:51 AM, Matt Martz wrote: > I have some sample plays that show how to wait for RackConnect automation > and the Managed Cloud automation to complete befo

[ansible-project] Re: Are Roles enough?

2014-06-03 Thread Adam Morris
On Monday, June 2, 2014 9:38:45 PM UTC-7, David Carmean wrote: > > > In my mind, any particular role that a server may fill (and it may fill > more than one), in turn requires one or more "features" or "feature-sets" > in order to be able to fulfill that role. In other words, I think of a > h

Re: [ansible-project] how to reference metadata in rax_facts

2014-06-03 Thread Matt Martz
I have some sample plays that show how to wait for RackConnect automation and the Managed Cloud automation to complete before moving on. I haven't gotten around to adding it to the Rackspace guide, but hope to do so soon. You can see those sample playbooks: https://github.com/sivel/ansible-sampl

[ansible-project] how to reference metadata in rax_facts

2014-06-03 Thread Jürgen Coetsiers
Hi All, My Rackspace cloud servers are under managed services and under RackConnect services. This means than when they are built, first 2 other scripts need to run before I can actually use the server to provision it. The peculiar thing is that during the RackConnect script the public ip of t

Re: [ansible-project] A couple errors recently cropped up

2014-06-03 Thread James Cammarata
Did you download a role from Galaxy or somewhere else? From the output of the error, it looks like somewhere in your play this appears: {{ lookup('pipe','some_executable_name_here') }} So you may want to grep for 'lookup' or 'pipe' in your files. On Tue, Jun 3, 2014 at 11:00 AM, Daniel Ottey

[ansible-project] Re: Conditional variable assignments

2014-06-03 Thread Adam Morris
On Tuesday, June 3, 2014 12:17:39 AM UTC-7, arnej wrote: > > Hi, > > this is probably easy but I cannot figure out how to do this with Ansible: > > - some task that registers variable x > - some task that registers variable y > - some task that registers variable z > > - register a variable 'a' f

Re: [ansible-project] How to use roles from the command line?

2014-06-03 Thread Adam Morris
On Monday, June 2, 2014 9:58:37 PM UTC-7, john...@caradvice.com.au wrote: > > without having to edit any files between getting it finished... > > > Methodological issue, not practical: it feels dirty to edit a file between > the test and the application. > Is creating and editing a new file the

Re: [ansible-project] A couple errors recently cropped up

2014-06-03 Thread James Cammarata
Correct, the warning message can be ignored, and there is a configuration setting (system_warnings in your ansible.cfg) that can be set to "False" to disable it. The fatal error appears to be reporting that the executable you're trying to call via the pipe lookup is not being found at the path spe

Re: [ansible-project] A couple errors recently cropped up

2014-06-03 Thread Daniel Ottey
Thanks for your response. Sorry for not being sure... But you're saying I'm calling an executable via a pipe lookup ... And I have no idea what that means. I'm certainly not doing it intentionally. You ask me to validate "the binary is there" but I don't know what binary to look for. Is th

Re: [ansible-project] Just Noticed

2014-06-03 Thread James Cammarata
We don't include the inventory scripts in the distribution currently, so downloading the ec2.py from github is normally the way to do it (which is where the link in the docs points you). So I'm not sure why the version from the repo would be any different than when you cloned the repo. Do you have

[ansible-project] A couple errors recently cropped up

2014-06-03 Thread Daniel Ottey
A couple errors have recently cropped up when using Ansible, and the latest is causing me to not be able to use it at all. I tried searching for the fatal error(s), but was not able to find anythin mysef, I'm hopeful that this forum can help me out. My OS is RHEL 6.4 and it also pulls package

[ansible-project] Just Noticed

2014-06-03 Thread Vinit Khandagle
Hi This is just bring to notice: I was setting up ec2 dynamic inventory and I followed the instruction on the Docs. I copied the ec2.py from the site and placed it as an inventory I did all the configuration right for boto and ec2.ini and ec2.py. But for some reasons I was not able to pull down

RE: [ansible-project] Re: Are Roles enough?

2014-06-03 Thread Snyder, Chris
I have to agree with Brian – sounds like you are not breaking your problem down into simple enough parts. The problem with Ansible (and other similar config management / state management tools) is that most people (well, at least me) come in thinking one way about their requirements which isn’t

Re: [ansible-project] Re: Are Roles enough?

2014-06-03 Thread Brian Coca
roles are there to make reusable units of non trivial set of tasks, sometimes its just easier to create a simple tasklist and use include:. If it is becoming 'painful' its a sign of trying to put square peg in round hole. Ansible is designed to be simple, also it is very flexible and can be used i

Re: [ansible-project] Re: Initial setup of a FreeBSD VPS

2014-06-03 Thread Brian Coca
ansible works with 2.7 no need for extra json install, simplejson is recommended when using earlier python versions.​ -- 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 em

Re: [ansible-project] Re: Initial setup of a FreeBSD VPS

2014-06-03 Thread Brian Coca
no news, I was aware of pkgng but not sure on how to bypass the initialization, since pkg_add still works I chose to use that.​ -- 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: Are Roles enough?

2014-06-03 Thread Joost Cassee
Recently I have changed my Ansible set-up based on roles. I have a very similar dependency structure as yours: host1 -> profile1, profile2 host2 -> profile2, profile3 profile1 -> state1, state2 profile2 -> state2, state3 ... Both profiles and states are roles, but I separate them into two roles

Re: [ansible-project] Re: lookup syntax (or client/server install)

2014-06-03 Thread Makimoto Marakatti
Hi Thanks for the comments. It would help tho, if I had explained the issue in a coherent way. :( Let me rephrase: I still got a service to install. But it's in a bunch of boxes that we'll call 'client-group' (client1, client2...). I still got a 'master' box that needs to be contacted for each

[ansible-project] Conditional variable assignments

2014-06-03 Thread arnej
Hi, this is probably easy but I cannot figure out how to do this with Ansible: - some task that registers variable x - some task that registers variable y - some task that registers variable z - register a variable 'a' for which holds: if x == True, a=y, else, a=z - some task that uses a How c