Sounds like you're wanting to be able to ssh to a machine based on
it's name instead of it's ip address. DNS is the obvious answer.
If not that, then maybe create an ansible playbook that generates an
/etc/hosts file for your control server based on the servers in the
inventory. Then you can just
This bug should be fixed. Which version are you using? But even when
it's fixed, the string false is a true value.
I do admit that |bool everywhere is kind of annoying, but it's the
safest way to always make sure your context is correct.
On Tue, Jun 23, 2015 at 12:31 PM, Si W wools...@gmail.com
, Brian Coca bc...@ansible.com wrote:
iirc when roles were added.
On Mon, Jun 15, 2015 at 12:12 PM, Michael Peters
michael00pet...@gmail.com wrote:
I've looked at the documentation on the site
(https://docs.ansible.com/playbooks_roles.html) that describes this
feature, but it doesn't indicate
(which was introduced
in 0.5).
Does anyone know when this feature was added?
Thanks,
--
Michael Peters
--
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
If we went that route, we should use the exsiting host pattern syntax:
http://docs.ansible.com/intro_patterns.html
On Mon, Jun 8, 2015 at 4:51 PM, Craig Tracey craigtra...@gmail.com wrote:
What if instead of gather_facts: force we develop a mechanism that is
simple in nature like:
I put it in ansible like everything else. And then bootstrap the
control node from my laptop (either a Mac or Linux laptop). And there
after I run that same ansible script on the control node against
itself.
On Wed, Jun 3, 2015 at 5:47 AM, jaysmythe...@gmail.com wrote:
Is there a recomended way
Actually, I prefer to have separate playbooks for configuration
management and deployment. The 1st rarely involves orchestrating
servers in anything complicated where ordering matters. And the 2nd
almost always involves ordered steps across multiple servers. That way
things can deployed without
You can pass it as variable through the command line and then use a
fail task to abort unless it's been set. That's how I've done similar
things in the past.
On Wed, May 13, 2015 at 3:37 AM, Marcel Bezemer mar...@beestig.nl wrote:
Hey,
I am currently playing around with ansible to see if this
is flushed, or on a new system that
was not loaded with the cache?
--
Michael Peters
On Mon, May 4, 2015 at 9:49 AM, Brian Coca bc...@ansible.com wrote:
Another way around this is using persistent fact caching.
--
Brian Coca
--
You received this message because you are subscribed
Gotcha, thanks!
On Mon, May 4, 2015 at 10:37 AM, Brian Coca bc...@ansible.com wrote:
It is not the solution, but it is a workaround available now.
On my list i have being able to 'delegate' facts so we can do something like:
setup: set_for={{item}}
delegate_to: {{item}}'
with_items:
I would use a dictionary where the keys are the hostnames. Then the task
would pull the variable it needs.
--
Michael Peters
On Apr 18, 2015 10:09 PM, Maruti Kumar maruti.gollap...@gmail.com wrote:
Need to execute a tak on muntiple nodes in parallel. And each execution
takes one value from
I don't know if this helps, but I usually use roles for configuration
management and use standalone playbooks for orchestration stuff. I've
just found it easier to have more control if I centralize certain
aspects (like say an application upgrade) in a single playbook instead
of spread around in
You're trying to compare a structure to a string. You probably meant
to use git_installed_version in your when conditional. Also, you
either need to quote the {{ git_version }} in the conditional so
that the string is quoted, or just leave it off entirely since it's
using 2 variables, no need to
Can you really set ansible_ssh_args per group/host? I remember trying
it a while ago and it didn't work. And it's not mentioned here:
http://docs.ansible.com/intro_inventory.html#list-of-behavioral-inventory-parameters
I'll admit I haven't tried it in a while, but can someone confirm that
it
If you are having SSH problems (really network problems), I've noticed
a big improvement when I run ansible from within the cluster that it's
managing. It's trickier if your server farm is spread out across
multiple DCs/clouds. But it's still more reliable than running it from
your laptop on a
One use-case that you might not have thought of is developers using
Windows, even if the target machine is Linux. I had this problem on a
previous team and had to hack our own provisioning step to use the
shell and run vagrant locally. Windows will probably never be able to
run vagrant. But why
Not the answer you're looking for, but why don't you just use ssh
keys? It's some minor work upfront with huge security and automation
benefits easier.
On Fri, Feb 13, 2015 at 3:51 PM, Ananda Debnath
ananda.debn...@gmail.com wrote:
Does anyone know of an example to do this using password
On Mon, Feb 9, 2015 at 10:55 AM, ProfHase profhas...@gmail.com wrote:
@Michael Peters:
I am using monit for monitoring. And depending on machine there are
completely different services to monitor. I could also do multiple roles
like 'monit_webservice' , 'monit_db', 'monit_application_a
On Mon, Feb 9, 2015 at 12:18 PM, ProfHase profhas...@gmail.com wrote:
Do you have any idea what to do about the machine-specific ssl-certificates?
Again, I can't think of a valid machine-specific ssl certificate
case. It should be based on roles, right? But I liked Brian Coca's
ealier comment
If your monitoring configuration differs too much between machines, I
think you might be doing it wrong. I can definitely understand how it
would be different per group/role (db vs web, etc) but how would it
differ between machines of the same role?
On Fri, Feb 6, 2015 at 8:46 AM, ProfHase
Another option I've used is to modify the ec2.py that comes in the
ansible sample inventories. For something simple like this it's not a
big deal, but when you start having more custom groups based on tags
and you don't want the ec2_tag_ prefix on every group (or are mixing
EC2 and non-aws
There was a bug in ansible where when a variable foo is the string
false it interprets both foo and not foo as true.
https://github.com/ansible/ansible/issues/8629
But this bug is for an old version of ansible. Which version are you using?
On Tue, Dec 9, 2014 at 5:21 PM, Matt Hughes
First, that's a really old version of ansible, and you need to upgrade.
Second, the when clause uses jinja syntax and it's complaining that
it can't evaluate your syntax: it's a syntax error, not a fact error.
In jinja, the not needs to come before the expression it's negating.
Try something like
In this case fred is the key to the exports dictionary. It can't be
both the key and the entry itself. Try something like:
{{ fred }}
{{ exports[fred].options }}
On Sun, Nov 23, 2014 at 6:35 AM, Stephen Tan s...@stanandliz.net wrote:
Hi - I'm doing something which seems very simple - trying
Instead of quoting each individual value, quote the whole line like this:
- name: Run the setup script
shell: {{ SITE_DIR }}/setup_jibs.sh creates={{ item
}}/run_setup_jibs_DO_NOT_REMOVE.sh
On Wed, Nov 19, 2014 at 1:47 AM, Steve Kieu msh.comput...@gmail.com wrote:
Hi everyone,
I want to
When you put a conditional on an include ansible adds that conditional
to each task in the include. So this is the expected behavior.
On Wed, Nov 19, 2014 at 12:39 PM, John Oliver jno...@gmail.com wrote:
My playbook:
- name: Get Java version
shell: /Library/Internet\
No, but you can add the machine to the necessary groups when you use
add_host after its created.
On Mon, Nov 17, 2014 at 4:57 PM, Josh Smift j...@care.com wrote:
I feel like I've seen questions like this on the list before, but I'm
having a hard time finding one now; apologies if this is old
You could try abstracting out the logic into a separate script that
both your inventory and your provisioning playbook could call to
determine which groups to put it in. I agree that it's a bit of a
pain. I'd really like to have this be possible as well since it would
really simplify some
You can have a directory underneath group_vars. Something like:
group_vars/all/
+ secret.yml
+ public.yml
Where secret.yml is vault encrypted.
On Thu, Nov 13, 2014 at 2:51 PM, Jacob Weber weberja...@gmail.com wrote:
I know we can have group_vars/all, which will apply to all hosts. But is
Adding a when condition to an include doesn't conditionally include
the file, it instead adds that condition to every task in that file.
So in this case yes, the debug does have the when statement.
On Tue, Nov 11, 2014 at 11:53 AM, cdar z cda...@gmail.com wrote:
But debug doesn't have when
This is because tags are not properties on the instance objects. I do
agree that it's weird that you can only pick properties of the
underlying python object for the destination variable.
The list of those properties is available here:
The children of a group in the inventory are assumed to be hostnames,
not other groups. This is why ssh is trying to find that groupname in
the ssh config, because it's supposed to be a host.
If you want to put a group as a child of another group you need to use
this syntax:
Another use case to consider (that I myself have come up against) is
configuring the bastion per-host from a dynamic inventory. The servers
need to use a different bastion depending on their role and location.
On Wed, Oct 29, 2014 at 12:17 PM, erewh0n keith.has...@gmail.com wrote:
Thinking on
, Michael Peters wrote:
Another use case to consider (that I myself have come up against) is
configuring the bastion per-host from a dynamic inventory. The servers
need to use a different bastion depending on their role and location.
On Wed, Oct 29, 2014 at 12:17 PM, erewh0n keith@gmail.com
It will be the remote nodes. In lots of cases these are all the same
(lots of setups have the same management account with the same
credentials on the managed nodes). And if you need to specify per-host
variables for the remote nodes you can do that as well in your
inventory.
On Wed, Oct 29, 2014
Try running the dynamic inventory by itself to see what output is generated.
./ec2.py
On Thu, Oct 23, 2014 at 11:32 AM, Bruce Bundy brbu...@gmail.com wrote:
I have a freshly installed Ubuntu 14.04 LTS instance running ansible 1.5.4
and python 2.7.6
In general my ansible playbooks are
It does, but the path is relative, not absolute. Try (notice missing
/ prefix on src):
template: src=folder1/template1.js dest=/opt/foo
On Sun, Oct 19, 2014 at 7:02 AM, Ajay Divakaran
ajay.divakara...@gmail.com wrote:
Hi all,
According to the documentation the template files should sit in
Sounds like you're running ansible from a git checkout. If that is the
case, you need to make sure your git submodules have been fetched as
well since the big ansible git submodule split:
See
https://groups.google.com/forum/#!msg/ansible-project/TUL_Bfmhr-E/rshKe30KdD8J
On Tue, Oct 21, 2014 at
I agree that it would be nice to have serial on the task level. Until
that happens you could break out of your current play with a one task
play that does just this but with serial: 1 set. Then go back to
another play that doesn't use serial to finish the rest of the tasks.
On Mon, Oct 20, 2014
Try embedding new line characters in your prompt string:
vars_prompt:
name: what is your name?
quest: what is your quest?
favcolor: what is your favorite color?\n 1) red\n 2) green\n 3) blue
On Sat, Oct 18, 2014 at 9:31 AM, Jim McMahon
jmcma...@flatworldknowledge.com wrote:
, 2014 12:12 PM, Tiglath te...@tiglath.net wrote:
Good rule. Thanks
On Wednesday, October 15, 2014 2:16:13 PM UTC-4, Michael Peters wrote:
vars_prompt goes on the play level, not the task level. It's not a
task and you don't have control over when the prompt happens. It will
ask you
What version of ansible are you running?
On Fri, Oct 17, 2014 at 1:45 PM, Tiglath te...@tiglath.net wrote:
I added run_once because despite local_action it seems to run once per
host but locally.
The error below contradicts the documentation. Or so it seems.
1:
--
hosts:
I have provisioning playbooks (AWS) that create the server. They then
use add_host to add it to the inventory.
When using add_host you can pass other variables along that act just
like host_vars that came from the inventory (AFAIK).
If you pass the ansible_ssh_user you can set the user that
for the link.
Regards,
Olga
On Thursday, October 9, 2014 1:33:15 AM UTC+5:30, Michael Peters wrote:
Try quoting the templated part. The {{ }} syntax markers mess up the
yaml parsing - http://docs.ansible.com/YAMLSyntax.html#gotchas
On Wed, Oct 8, 2014 at 3:41 PM, olga osu...@gmail.com
vars_prompt goes on the play level, not the task level. It's not a
task and you don't have control over when the prompt happens. It will
ask you before the play starts to answer any questions in the prompt.
Just a helpful way to think about what can go in the task list: Is it
a module? (
I do this by tagging each dependent role as 'dependent-role' and then
use the --skip-tags dependent-role when I need to execute just the top
level role (usually only for testing).
On Thu, Oct 9, 2014 at 1:11 PM, Chris Arnesen chris.arne...@gmail.com wrote:
He just means that sometimes the user
Are you setting sudo to true somewhere else. It's hard to see when
you've just shown a portion of playbook. If not and you just need sudo
for this task, then you can set it per-task like so:
tasks:
# TOMCAT 7 ###
- name: Install
It seems you're trying to double template. If you're inside of the
{{ }} markers you don't need further {{ }} templating. Trying
something like this:
debug: msg=Firmware needs to be updated
when: {{ firmware_version_on_server.stdout |
version_compare(firmware_version_desired,'') }}
On Wed, Oct
The command module just takes a simple command. If you need a full
shell (for pipes, io redirection, etc) use the shell command.
But in this case it's still not going to do what you want. The
access variable won't be visible to anything outside of that command
so it's essentially worthless. If you
You are setting test_err to the *string* yes, but ingore_errors is
looking for a boolean expression. Also, you don't need to using the
{{ }} syntax in ignore_errors since it is already using jinja2. Try
using the bool filter:
- hosts: jump
remote_user: deploy
gather_facts: yes
tasks:
-
You can use the set_fact module for that.
On Oct 3, 2014 7:03 PM, J Hawkesworth j.r.hawkeswo...@googlemail.com
wrote:
So I created some tasks in one of my roles today that queries Jenkins to
find the latest build of a project and then uses that build number to go
get a zip file onto one of my
On Tue, Sep 30, 2014 at 3:14 PM, Michael DeHaan mich...@ansible.com wrote:
A nice way to express the above might be to use group ranges:
- hosts: specific_group[0:5]
Nice, I wasn't aware of this syntax. I've used the longer form when
doing something like setting up an elasticsearch cluster
Do you need to do this randomly and then remember which ones were
randomly chosen? Or could you just, say, work with the first X in a
group? If the latter, you might be able to do something like this
(untested) to do the first 3 servers in a specific_group:
hosts:
The regex_replace filter is probably what you're looking for. Assuming
there are only ever 3 segments separated by a hyphen, and you want the
2nd, something like this would work:
{{ ansible_hostname | regex_replace('^[^-]+-', '') | regex_replace('-.*', '') }}
On Mon, Sep 22, 2014 at 9:07 AM,
Removing a role or changing a machine's role is pretty rare. Most
people in that situation would just shutdown that vm and spin up
another with the new role. If you aren't running virtual machines then
I'd suggestion having a separate playbook called something like
remove-role-X.yml where X is
I prefer to have my application role depend on my database role and
then have my application role setup the things it needs like users and
databases. That way my database role is re-usable for other
applications have their own database and user needs.
On Thu, Sep 18, 2014 at 10:13 AM, Strahinja
It should be repos_extra_installed.results[0].stat.exists.
It's more complicated because you're doing a with_items on the task
that does the register. So each item in that list will have a separate
entry in the repos_extra_installed.results list.
On Sat, Sep 13, 2014 at 2:15 AM, Patrick
This is something I've thought about too. The variable naming mismatch
has caused me some headaches as well as the issue of trying to load
all of the information that the EC2 dynamic inventory pulls for newly
provisioned machines. Would be nice if I could add_host and ec2_facts
without having to
You could modify your dynamic inventory. I think in the past it's been
said that the ec2.py, etc are starting points for your own dynamic
inventory scripts. This way you can do what you want with your
ec2_tag_* variables and makes it easier when part of your
infrastructure isn't even on EC2.
On
That's a pretty old version of ansible. I suspect that the
regex_replace filter didn't exist then. You should definitely upgrade
since it works on 1.7.1.
On Fri, Sep 12, 2014 at 10:07 AM, Andrew Pashkin
andrew.pash...@gmx.co.uk wrote:
With this playbook:
- name: test playbook
hosts:
Does the chdir argument to raw work?
raw: /usr/sbin/lsof /afs chdir=/
On Fri, Sep 12, 2014 at 12:45 PM, Jesse DeFer jde...@gmail.com wrote:
I am trying to create a playbook to unmount an AFS mounted home directory,
but I can't unmount it because the user running ansible has open files
You can pass variables into add_host, so if you have the information
you need you can pass it along with the name you need. For instance:
add_host:
name: blah
groups: db
ec2_tag_Name: blah
ec2_tag_Environment: staging
I believe they will be considered inventory host_vars (and
On Thu, Aug 28, 2014 at 12:34 PM, Patrick Heeney
patrickhee...@gmail.com wrote:
Even with the widest screens available it is very difficult to read
everything on one line. For version control as mentioned it is also a lot
easier to break it up.
Take for example this playbook of mine:
This is what host_vars are for. You can set them as part of your
inventory file (or dynamic inventories can set them too) or you can
have host_vars files which data for each (similar to group_vars).
See http://docs.ansible.com/playbooks_variables.html and
false and it's
important the word doesn't get auto-converted into a boolean.
On Wed, Aug 13, 2014 at 1:43 PM, Michael Peters michael00pet...@gmail.com
wrote:
Also, isn't it weird the with the variable foo set to string false
both when: foo and when: not foo evaluate to false?
On Wed, Aug 13
that way.
Can you share a playbook that reproduces this?
On Thu, Aug 14, 2014 at 9:08 AM, Michael Peters michael00pet...@gmail.com
wrote:
Yes, I realize the difference between a string and a boolean. But I've
never seen a system where foo and not foo evaluate to the same
thing.
On Thu
, Aug 14, 2014 at 9:42 AM, Michael Peters michael00pet...@gmail.com
wrote:
Sure: test.yml
---
- hosts: 127.0.0.1
connection: local
tasks:
- set_fact: foo=false
- command: ls /
when: foo
- command: ls /
when: not foo
Executed like ansible-playbook -i '127.0.0.1
is:
when: not foo|bool
On Wednesday, August 13, 2014, Michael Peters michael00pet...@gmail.com
wrote:
Before I file a ticket, I just want to make sure I'm not doing
anything wrong. BTW, this is a simplified example to reproduce the
problem, not what I was actually trying to do. I have
, Aug 13, 2014 at 10:31 AM, Michael Peters michael00pet...@gmail.com
wrote:
Is there a way to use set_fact to force it to use a real boolean
instead of the string? In the real playbook other tasks and includes
further down don't care where the var came from and I'd rather not
have to alter
Also, isn't it weird the with the variable foo set to string false
both when: foo and when: not foo evaluate to false?
On Wed, Aug 13, 2014 at 1:42 PM, Michael Peters
michael00pet...@gmail.com wrote:
Thanks, this works.
I was under the impression that the 2 syntax variants (yaml vs
key-value
Ansible 1.7 added the new run_once keyword so that a given action
will only run once for that host list.
On Fri, Aug 8, 2014 at 10:08 AM, Guy Matz guym...@gmail.com wrote:
Hi! I have a few django servers . . . I would like to run a syncdb in my
playbook, but only need/want one of the django
I don't know if you know this, but variables can themselves be
templated. You can do this in a set_fact or even in a variable file
(group_vars, host_vars, var_files, etc).
For instance:
set_fact: foo={% if yada %}{{ (blah + baz) / 100 }}{% else %}{{ fiddly
* 100 }}{% endif %}
Or in a var file:
Probably not the best way, but you could use a string inside of the
jinja templating
- name: obtain image id
local_action: shell docker inspect --format={{ '{{.Id}}' }} {{
docker_image_name }} | cut
register: docker_image_id
On Fri, Aug 8, 2014 at 1:04 PM, Vijay Korapaty
I'm testing out the new run_once feature and overall it's working
great. But I then tried it in an upgrade playbook using serial. The
task is no longer run just once per-play, it's run once
per-host-group. So for a serial of 2 in a target group of 10 servers
it's run once per pair, so 5 times.
On Thu, Jul 24, 2014 at 7:00 AM, Michael DeHaan mich...@ansible.com wrote:
You could also set a simple play like this, which would probably be cleaner:
- hosts: blarg
serial: 1
tasks:
- pause: seconds={{ n }}
- service: name=foo state=restarted
Is there a way to do something
If I understand correctly, this is what add_hosts is for. After you've
dynamically created a host you can add it to a group and then in a
subsequent play include a role that would configure that group.
Is that what you're looking for?
On Thu, Jul 24, 2014 at 9:43 AM, Guy Matz guym...@gmail.com
On Thu, Jul 24, 2014 at 11:54 AM, David Reagan jer...@gmail.com wrote:
So, handlers seem like they are just special tasks that you can call with
the notify option. If that's the case, couldn't I just make a handler that
uses the at module instead of the service module? Actually, I think I've
I actually tackle this another way. I write provisioning playbooks
(not a role) that will create the server on the provider. And then
when it's finished, run some bootstrapping steps. After that is done,
use add_host to add it to the right group and then include the
role-level playbook.
This way
On Thu, Jul 17, 2014 at 9:38 PM, Michael DeHaan mich...@ansible.com wrote:
This is not because of cwd at all, but because of the playbook basedir.
You're right that the cwd isn't causing the difference in behavior. I
was trying to point out that it seems weird that playbooks behave
differently
I don't want to change the current behavior, just add to it. This
wouldn't stop using the playbook basedir as the primary place to look.
But you're right, it would change the execution based on where you
execute the command. But only if you were using the cwd feature. This
wouldn't stop using the
So how do you solve loading group_vars automatically? Or if you don't,
how do you resolve the differences between how group_vars are treated
when automatically loaded vs loading them explicitly with vars_files ?
That's the issue that led me on this wild chase.
On Fri, Jul 18, 2014 at 10:46 AM,
...@ansible.com wrote:
I'd consider using roles and just making your role path configurable, which
would still make it easy to keep all your plays in whatever location you
like.
(You could even keep roles in different repos, etc)
On Wed, Jul 16, 2014 at 5:57 PM, Michael Peters michael00pet
files sitting at the
top level if I did it that way. And this project is just getting
started.
Using the cwd as an extra path lookup seems like a pretty easy way to
add this capability without any problems that I can see.
On Thu, Jul 17, 2014 at 9:21 AM, Michael Peters michael00pet...@gmail.com
Right now the various mysql_* modules will pull default connection
information from the ~/.my.cnf file. This is especially important to
make things repeatable especially when the server is newly provisioned
and insecure.
But it doesn't use the socket information in the ~/.my.cnf file.
Instead if
I'm looking for advice about how to organize my playbooks. Not so much
the content as their structure on the file system.
Currently I have all of my configuration management (role-level)
playbooks at the top level with things like common.yml, app.yml,
db.yml, etc. These correspond directly to
Try something like this:
{% for svr in groups.ntp_servers %}
{% if not svr == inventory_hostname %}
peer svr
{% endif %}
{% endfor %}
On Mon, Jul 14, 2014 at 4:30 AM, John Wang john.wang@gmail.com wrote:
I'm new to Ansible and want use it to configure a NTP service. here is my
Would it be possible to have an extra option to command to so that it
can work similar to the uri module's return_content option? That way
results that are registered would be the same except for an extra json
key with the structured data. Not sure what to call it as
return_content isn't
Try using debug on ec2_info to see what it contains. It seems that
instances is coming back with a list of strings and not a list of
objects like you thought.
On Wed, Jul 9, 2014 at 4:50 AM, Ofer Herman ofe...@gmail.com wrote:
Hi,
I'm using exact_count when creating an instance on EC2, when
On Thu, Jun 26, 2014 at 1:21 AM, Faisal Ali Rabbani
rabb...@zoniversal.com wrote:
Obviously I have not shared credentials this is the policy of role, which
has full access of ec2.
Sorry, I wasn't clear. Are you showing the policy rules of the role
being created or the one doing the creation?
When inside the {% %} part you are inside of jinja and don't need
special syntax to tell it that your using jinja variables. Something
like this should work:
{% for host in groups[deploy_env + '-web'] %}
server {{ host }} {{ host }}:80
{% endfor %}
On Tue, Jun 24, 2014 at 10:48 AM, Claus
I've added normalize_groups as part of
https://github.com/ansible/ansible/pull/7867
On Thu, Jun 19, 2014 at 5:35 PM, Michael DeHaan mich...@ansible.com wrote:
That seems reasonable to me.
On Thu, Jun 19, 2014 at 4:33 PM, Michael Peters michael00pet...@gmail.com
wrote:
I thought about
it's trying to
create a default ingress rule which will also use -1's for the same fields,
but for some reason it's not seeing you adding that rule yourself.
On Wed, Jun 18, 2014 at 4:58 PM, Michael Peters michael00pet...@gmail.com
wrote:
I have the following as part of a playbook
18, 2014 at 3:09 PM, Michael Peters michael00pet...@gmail.com
wrote:
I'm trying to create a VPC with certain tags which are derived from
variables. I feel like I can't find the right YAML/Jinja/whatever
syntax to make it work though.
At first I tried setting them in the resource_tags directly
You can pull it from the hostvars dictionary with something like
hostvars[inventory_hostname]['ec2_tag_elasticbeanstalk_environment-name']
On Thu, Jun 19, 2014 at 12:06 PM, Roger Hunwicks
roger.hunwi...@gmail.com wrote:
After further investigation...
When the playbook runs, on that task
, so it's
easy to fix with a convention.
On Thu, Jun 19, 2014 at 12:28 PM, Michael Peters michael00pet...@gmail.com
wrote:
You can pull it from the hostvars dictionary with something like
hostvars[inventory_hostname]['ec2_tag_elasticbeanstalk_environment-name']
On Thu, Jun 19, 2014
I've wanted to create a mysql_query module that would probably help
with a lot of things like this. It could execute an arbitrary query
and then you could register the results. Would make it easier than
having to manipulate mysql command line stdout since you could use
structured data.
I just
But it gets more unwieldy if you're using roles. If my app role needs
to have the IPs for the databases I just have to hope that the
playbook that ends up running the tasks in my play have gathered all
the facts from those other systems. It gets even more
action-at-a-distance when your role is a
If you have a redis group of servers you can do something like:
{% for host in groups['redis'] %}
{{ hostvars[host].ansible_default_ipv4.address }}
{% endfor %}
Which will print the IP address of that host in the template file.
On Mon, Jun 2, 2014 at 9:45 AM, Damjan Georgievski
On Wed, May 28, 2014 at 7:58 AM, Michael DeHaan mich...@ansible.com wrote:
I'd configure your backup tool to indicate what paths should be backed up.
That's actually his initial question. Apache knows where to serve
sites from based on that role's (or groups) variables. Now his backup
tool
On Wed, May 21, 2014 at 6:21 PM, Michael DeHaan mich...@ansible.com wrote:
Don't do this :)
Use Ansible and if need be, configure jumphosts, or whatever, but Ansible
shouldn't ever *NEED* to call ssh.
I agree it shouldn't be done in general, but I'm interested to see how
you would have
1 - 100 of 115 matches
Mail list logo