YAML is great; I was confused at first because I thought it was a "markup
language" like HTML, but it's just a way to represent data structures.
It's not a programming language, though. If you want to write your system
configuration in a programming language (Python, in this case :^), you
might
I have a data structure like this:
part:
eyes:
where: faces
colors:
- blue
- brown
- green
hair:
where: heads
colors:
- black
- blond
- brown
- red
toenails:
where: feet
colors:
- pink
- red
- teal
I want to
subelements([1, 'colors']) }}"
> loop_control:
> label: "{{ item.0.0 }}_{{ item.1 }}"
>
> From there, you should be able to extrapolate to meet your specific needs,
> potentially using the template module, to write out the files.
>
> On Mon, Jun
We want to do this as a check that all of our hosts are in synch; we have a
playbook per system type, and we don't want the check to fail if e.g. the
only host of a given type is down (which would thus be a 100% failure of
that playbook).
We do it like this:
- import_playbook: thing1.yml
- imp
There's a bunch of issues about
this; https://github.com/ansible/ansible/issues/20736 is one, but I think
maybe isn't yours. If you search there for "block always", though, you'll
probably find some stuff.
(I also had to reply to this, since I used to also be Josh Smith. But a
different one. :
This is a good metaphor, and I've never understood why `serial` works this
way. We've repeatedly had situations where we want to do things on a few
hosts at a time, and continue even if one batch of them fails -- especially
if the batch size is 1 -- and there's just no way to do that.
I underst
On Thursday, March 1, 2018 at 8:59:10 AM UTC-5, Josh Smift wrote:
>
> I understand the use cases for wanting to fail if all your batches fail:
>
Oops, I misspoke here: I meant "the use cases for wanting to fail the whole
play if all the hosts *in one batch* fail.
To switch back
This may be a dumb question, but can you develop on a remote system too? My
company also doesn't support Linux workstations/laptops, but I do all my
Ansible development work on remote Linux hosts anyway.
On Monday, March 19, 2018 at 10:53:46 AM UTC-4, Bill Brothers wrote:
>
> As has been asked a
My use case involved roles. I had something like
- hosts: web:app:db
roles:
- role: myrole
when: color == "blue"
In the role, there was a task that ran on localhost (via delegate_to), but
only once (via run_once) for the whole batch of hosts.
Everything worked fine, except that if t
ndition is logical-AND-ed with any other conditions on the task,
such that if the task has conditions that cause it to get skipped on the
first host in inventory, this condition will cause it to get skipped on all
the other hosts as well.
On Tuesday, March 20, 2018 at 1:13:58 AM UTC-4, flowerysong w
Why are you setting "verbosity: 3"? According to
http://docs.ansible.com/ansible/latest/modules/debug_module.html, that
means "if you set to 3 it will only run debug when -vvv or above". That's
causing Ansible to skip the task, thus the message you're seeing
("Verbosity threshold not met").
Re
but it gives me back the same information.
> <>
> The problem is that vmware_vm_shell module does not return the output of
> the command.
>
>
>
> El martes, 15 de mayo de 2018, 3:40:26 (UTC+2), Josh Smift escribió:
>>
>> Why are you setting "verbosity: 3&
Even with Mitogen's current limitations, it cut run times about in half for
our "do everything to all the hosts" playbook, which hits about 200 hosts
with 1600 tasks in our biggest environment.
On Tuesday, August 7, 2018 at 7:45:38 AM UTC-4, David Wilson wrote:
>
> Hi,
>
> Just to note Mitogen s
If you use the template module and the dest parameter specifies a
directory, the module creates a file in the directory with the same name
as the value of the src parameter. However, if you then change the source
contents, and run ansible-playbook with --check --diff, it says that
there's a change
JBS> https://docs.ansible.com/ansible/template_module.html doesn't say
JBS> that you can specify a directory as the value of the dest parameter.
JBS> Should that work?
JBS>
JBS> If it should work to specify a directory, should 'diff' work as well?
JBS>
JBS> I can create a bug report, but I wasn't s
https://github.com/ansible/ansible/issues/24413 -- thanks!
-Josh (j...@care.com)
(apologies for the automatic corporate disclaimer that follows)
This email is intended for the person(s) to whom it is addressed and may
contain information that is PRIVILEGED
We uploaded an IAM cert to AWS, and now need to update the certificate
(the contents). On the theory that a lost of this stuff is idempotent, I
thought this task, which we used to upload it in the first place, would
work to update it as well:
- name: configure IAM certificates
iam_cert:
DC> In this specific case I could get away with dropping the final clause
DC> of the `when` check, but does anybody have an idea how to refactor
DC> this to avoid the warnings in future? I get the feeling I'm missing
DC> some very obvious pattern here.
Just drop the Jinja delimiters: Since 'when'
BM> When wanting to namespace variables in a role, is it typical to use a
BM> hash, or a prefix? Is there a best practice for this?
There are pros and cons either way. Off the top of my head, using a hash
lets you iterate over it easily, and IMHO looks nicer; but you can't (as
far as I know) add e
ta> task:
ta> - include: lvm.yml
ta> when: ansible_devices.{{ raw_disk }}.partitions|length == 0
The shortcut a.b.c.d notation doesn't let you distinguish between literals
and variables. Try the more Pythonic
when: ansible_devices[raw_disk]['partitions']|length == 0
and see if that does
Does 'meta: clear_host_errors' help in this situation?
http://docs.ansible.com/ansible/latest/playbooks_error_handling.html#resetting-unreachable-hosts
only mentions this as affecting unreachable hosts, but
http://docs.ansible.com/ansible/latest/meta_module.html mentions that it
clears the failed s
Is this the same problem as
https://github.com/ansible/ansible-modules-core/issues/1068 ? It looks
from your output like it might be:
138.68.160.0/20, TCP, from port: 22, to port: 22, ALLOW" already exists
fatal: [localhost]: FAILED! => {"changed": false, "error": {"code":
"InvalidPermission
As a new feature, you could imagine being able to put something like
tags:
- javajdk
into .../roles/javajdk/meta/defaults.yml, but I don't think there's
currently a way to tell a role "add this tag to all your tasks", inside
the role itself, other than adding the tag explicitly to all the t
There's a bunch of tickets about run_once and skipped hosts;
https://github.com/ansible/ansible/issues/19966 is my personal favorite.
-Josh (j...@care.com)
(apologies for the automatic corporate disclaimer that follows)
This email is intended for the person(
> Weirdly, when I try to create an in-memory host group using when and
> add_host the task only gets executed one time (on a skipped host). I
> don't have run_once on this task so I'm not sure why all my nodes aren't
> executing it. Any ideas?
add_host is implicitly run_once; there's a note about
There doesn't seem to be a way to fetch a file by URL that meets both of
these criteria:
- When run without --check, replaces the dest file with the contents of the
source file if and only if they're different.
- When run with --check, correctly tells you whether anything would change
if you ru
Yar; and also, force: no means that it doesn't even check if the file has
changed, whether in --check mode or not -- if the file exists, it doesn't
do anything, even if the contents are wrong.
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
It turns out that unarchive with a .zip file basically works -- except that
on our Ubuntu 16.04 systems, for some reason, it deals with timezones in
some bizarre way that I can try explain but won't bother unless anyone
really wants to know. As long as the zip files were built in the same
timez
Having Ansible just push out changes as soon as they're merged to `main` (or
whatever) is pleasantly CI/CD like, and means that you can solicit pull
requests
from interested parties who may not have privs to run Ansible, and not have
to push out their changes by hand once the PRs are merged. Bu
Our inventory comes from multiple sources, a couple dynamic and one
static. Ansible itself can pull them all together into a unified
inventory, but we'd like to transform the dynamic sources on the way in,
without having to hack the scripts that produce them, so we can use the
stock versions from .
Between Ansible 1.5.3 and 1.6.6, lib/ansible/module_utils/known_hosts.py added
from hashlib import sha1
which doesn't work on target hosts who only have Python 2.4.
The 'git' module uses this, and produces this stacktrace on a target RHEL
5 system:
Traceback (most recent call last):
Heh, I didn't think to check this before I'd sent mail, but there's
actually already a fix for this in devel, in
https://github.com/ansible/ansible/commit/60451c20ab0cb8293a1ba51b48c600819a676626
--
it just hasn't made it into a release yet, I guess.
-Josh (
MD> But Ansible playbooks are not Python, nor do we assume folks will need
MD> to know Python.
Sure; I think that was just an example of a coding style that recommends
short lines (along with the Linux kernel coding style).
FWIW, I think the diff argument is pretty compelling: I find it a lot
eas
We've got a task like this:
- name: template TrustedHosts
template: dest=/etc/opendkim/TrustedHosts src={{ item }} backup=yes
with_first_found:
- TrustedHosts.{{ stack }}
- TrustedHosts.default
There are three hosts that use the playbook this is in, and when Ansible
get
MD> Can you please file a bug on this one so we can look at it?
Done: https://github.com/ansible/ansible/issues/8879 (from my personal
account, I don't have a work-related Github account at the moment).
Thanks!
-Josh (j...@care.com)
This email is intended
Is there a way to tell Ansible to only show output for things that have
changed? We've got playbooks that include roles and run dozens of tasks,
and often want to check to see what's going to happen before we actually
run them (because we share some common code between a couple of sites,
each of wh
MD> Ansible will print everything, because it's important to know when
MD> things come back.
In our usage, we frequently don't care at all when things come back: We
have a playbook that we know is going to take several minutes to run
(dozens of tasks on dozens of hosts), so we fire it off, go do s
MD> Inventory script gets evaluated at inventory host time, so it's always
MD> a good idea to use "add_host" to explicitly add them in memory to
MD> those specific groups.
Is there a way to add variables for them, too? For example, if you want to
use inventory variables like ec2_tag_ in your tasks
MD> What version of ansible are you running?
1.6.6 at work, 1.7.1 at home.
-Josh (j...@care.com)
This email is intended for the person(s) to whom it is addressed and may
contain information that is PRIVILEGED or CONFIDENTIAL. Any unauthorized use,
distri
MD> What version are you running when you are testing that group_vars/ is
MD> not available to hosts added with the add_host module?
1.7.1 -- but it's not that variables from group_vars aren't available,
it's that host-specific ec2_tag_* variables that come from the ec2.py
dynamic inventory script
JBS> 1.7.1 -- but it's not that variables from group_vars aren't
JBS> available, it's that host-specific ec2_tag_* variables that come from
JBS> the ec2.py dynamic inventory script aren't available.
Ah, sorry, I now see that this thread was in fact originally about
group_vars. I segued off into ho
MP> You can pass variables into add_host, so if you have the information
MP> you need you can pass it along with the name you need. For instance:
MP>
MP> add_host:
MP> name: blah
MP> groups: db
MP> ec2_tag_Name: blah
MP> ec2_tag_Environment: staging
MP>
MP> I believe they will be
CM> Basically, assuming this were possible somehow, it's what I want to do
CM> (note the same dict key on both sides of assignment):
CM>
CM> hostvars[host].zookeeper_myid = hostvars[host].ec2_private_ip_address
This seems like the thing that someone else helped me figure out how to
do, e.g. I now
Keep in mind is that there are two things here: The user you run Ansible
as, and the remote user that Ansible acts as on the target systems. One
thing you can do is set remote_user to 'ansible', and then put your
admins' public keys in the 'ansible' user's authorized_keys file on the
target systems
We have a playbook like this:
- hosts: localhost
gather_facts: false
vars:
produsers: [chris, dana]
stgusers: [pat, sandy]
allusers: [alex, andy, chris, dan, dana, jamie, pat, sandy, terry]
tasks:
- name: show authorized
debug: msg={{ item }}
MD> However, what's happening is "item" is the only thing that decides
MD> what you are looping over.
Right; the thing that we wanted to do here, if I were expressing it in
Python-like pseudocode, would be something like:
for user in allusers:
if user in itertools.chain(produsers, stgusers)
We want to with_items over a set of variables with private data in them,
like AWS keys. This causes us to get output like
TASK: [ourtask | template .s3cfg]
changed: [host1] => (item={'access_key': 'my-access-id', 'secret_key':
'my-secret-key', 'name': 'me'
MM> I would recommend setting 'no_log: True' on your task. Then the contents
MM> of the items will be suppressed. We do this with 'secrets' and with tasks
MM> that loop over data sets that have overly large strings or values.
MM>
MM> There is some additional information at:
MM>
MM> http://docs.an
JC> Yes, here's a simple reproducer:
JC>
JC> - hosts: localhost
JC> gather_facts: no
JC> vars:
JC> test: ['a', 'b']
JC> tasks:
JC> - shell: echo -e 'a\nb\nc'
JC> register: result
JC> - debug: var=result
JC> - name: do it
JC> yum: name="{{item}}"
JC> with_items: result.st
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 ground.
I've got a playbook that provisions a new Rackspace Cloud host, and then
includes a role specific to that type of host. In that role, there are
some templates
MP> No, but you can add the machine to the necessary groups when you use
MP> add_host after its created.
Yeah, I can mostly do this; the tricky thing is that there are some
derived groups that the host gets added to based on logic in the dynamic
inventory script. I could in theory duplicate that l
JBS> This email is intended for the person(s) to whom it is addressed and
JBS> may contain information that is PRIVILEGED or CONFIDENTIAL.
KEJ> (sigh). Really??? Really?? Surely nobody uses that legalese rubbish
KEJ> noise anymore?
Surely not. I can't explain where that text came from. Probably n
Bleah, so the latest snag I've run into is that our dynamic inventory
script sets some host variables, including some that are based on the
derived groups that it comes up with, and of course *those* aren't
available even after adding the host to a group during a run, because
they're not "group var
It looks like the rax_meta module only supports the complete replacment of
the existing metadata with a new struct of metadata. Is that right, or am
I overlooking something? (I'm using 1.7.2, but it looks like the current
version at
https://github.com/ansible/ansible-modules-core/blob/devel/cloud/r
JBS> There's not a way to have a dynamic inventory script create group
JBS> variables, is there? It's all just host variables?
SvG> That is certainly possible:
SvG> http://docs.ansible.com/developing_inventory.html#script-conventions
Oooh, that is super, and after modifying our custom dynamic inv
MP> Two shell tasks with "tar -c" and "tar -x"?
If you want to preserve permissions; or you could run a command that pipes
one to the other; or you could run a command that runs an rsync preserving
permissions.
If you want to copy a file and *change* the permissions, that could be
harder. Maybe t
http://docs.ansible.com/route53_module.html doesn't mention being a way to
list all the records in a zone;
http://docs.aws.amazon.com/Route53/latest/APIReference/API_ListResourceRecordSets.html
talks about an API call to do it. Does Ansible support this in a way other
than what's on that route53_m
I have some variables like 'service', which can be "abc" or "xyz", and
'site', which can be "bos" or "sfo", on different hosts. I have hosts
whose FQDNs are like service-site-thing-N.site.service.care.com, which
have those those variables set accordingly, in a group like 'things'.
My use case is t
MM> The problem is that cannot nest jinja brackets inside of brackets.
Ah! Right, because brackets mean "Jinja", not just "variable". Still new
here. :^)
MM> Your following example:
MM>
MM> {{ ansible_hostname | regex_replace("^{{service}}-{{site}}-", '') }}
MM>
MM> Should probably be:
MM>
MM>
YvB> Changed_when will report the task never as changed right? My goal is
YvB> to to use "when", but to report it as "ok" or "changed", but never as
YvB> "skipped".
Yeah; I can think of use cases for all of "I don't want to see skipped
things", "I don't want to see ok things", and "I don't want to
MH> I’m not sure why I’d ever want to use vars/ then. Sure I could be
MH> convinced of a use-case
A use case I've seen, which doesn't seem all that uncommon, is when you
want to use a given role with multiple inventories, each of which has its
own inventory/group/host vars structure. Putting t
http://docs.ansible.com/intro_patterns.html shows
webservers:dbservers:&staging:!phoenix
as an example of a combination of unions and intersections, and says that
this means
all machines in the groups `webservers' and `dbservers' are to be
managed if they are in the group `staging' also, b
One thing about SSH keys is that they're generally unique to one person
(or one account anyway). I feel like there's a not-uncommon use case for
wanting your sysadmins (in a Unix group 'sysadmin', say) to be able to
access Ansible vault files as themselves (i.e. without sudo), which would
be easy i
We want to use the rax module to create instances of the "Memory" flavor,
and are getting an error like
msg: Policy doesn't allow memory_flavor:create:image_backed to be performed.
when we try. https://github.com/chef/knife-rackspace/issues/91 looks like
a similar issue for Chef, where they con
MM> Ansible 1.8 does not support boot from volume for rax servers. 1.9
MM> will however support this properly:
MM>
MM> https://github.com/ansible/ansible-modules-core/pull/798
MM> https://github.com/ansible/ansible/pull/10259
MM>
MM> extra_create_args unfortunately doesn't give you full enough cont
JBS> I'm playing with a clone of devel, and making some progress, but one
JBS> thing we're having trouble with is using rax.py to get our inventory.
JBS> I'm using the rax.py from devel, and it seems to be failing with a
JBS> pyrax exception:
JBS>
JBS> pyrax.exceptions.BadRequest: n/a (HTTP 400)
BK> But having general variables override specific variables simply does
BK> not make any sense. I have seen no argument from the Ansible team that
BK> supports this behavior on its merits.
Is the issue that general variables override specific variables, or just
that there isn't a way to express i
We use the ec2.py inventory plugin, and
vpc_destination_variable = Name
in ec2.ini so that our inventory shows the value of the Name tag rather
than an IP address. However, we'd like to use the IP address from
inventory to actually talk to the host, so that if the name doesn't show
up in DNS r
FL> - name: check if target server is CentOS 6 or Ubuntu 14
FL> fail: msg='unsupported platform detected!'
FL> when: (ansible_distribution != "CentOS" and
FL> ansible_distribution_major_version != "6") or (ansible_distribution !=
FL> "Ubuntu" and ansible_distribution_major_version
ER> when: (alias != "leia") or (alias != "luke") or (alias != "vader")
ER>
ER> If I turn those conditionals from != to ==, the play only runs on
ER> those 3 servers as expected. But if I run it like it is above, it runs
ER> on ALL hosts.
No matter what your alias is, at least one of those condit
Try this, in ec2.ini:
vpc_destination_variable = Name
(Or something other than Name if you want to use a different tag.)
-Josh (j...@care.com)
This email is intended for the person(s) to whom it is addressed and may
contain information that is PRIVILE
AQ (https://github.com/caredotcom/ansible-quartermaster) might be of interest.
-Josh (j...@care.com)
This email is intended for the person(s) to whom it is addressed and may
contain information that is PRIVILEGED or CONFIDENTIAL. Any unauthorized use,
JL> 3) Now, I need to use the variable passed on command line to get the
JL> variable from /vars/main.yml:
JL> {{ redis_password.{{ app_env }} }}
Yep, just the syntax is wrong. Two things:
(1) The {{ and }} marks just say "start parsing Jinja", so you don't ever
need to nest them.
(2) The d
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
We wrote a way to merge static and dynamic inventories; you could also use
it to have static inventories in multiple files, and merge them together.
https://github.com/caredotcom/ansible-quartermaster
-Josh (j...@care.com)
This email is intended for the
We do stuff with inventory variales and dicts, like
become_method:
5.7: doas
5.8: doas
6.0: sudo
ansible_become_method: become_method[ansible_distribution_release]
You can't do the >= thing this way, you have to enumerate all the options.
(Or you could have a default and only en
Would a
- meta: flush_handlers
task, immediately after the copy task (or whatever populates /etc/aliases,
and does the notify), do what you want in this case? It still wouldn't
help if the SSH connection dies immediately after the copy task, but
there's not a whole lot you *can* do in that case
AT> Before I start banging my keyboard into the window, I wanted to ask
AT> why this task produces a Syntax Error:
AT>
AT> - name "cat /etc/shinken/modules/webui.cfg | grep 'modules
AT> auth-cfg-password'"
AT> shell: runuser -l shinken -c "cat /etc/shinken/modules/webui.cfg |
I think y
BC> you cannot have multiple roles: declarations per play, if you want to
BC> make this work in that order you need a 2nd play:
If you really needed to do it in one play for some reason, you could have
a 'pause' (or whatever) role, with one pause (or wait_for) task.
You may be able to have your text editor insert spaces when you hit the
tab key, if that's what you want. Google turned up recommendations for vi
and Emacs, or search for your editor of choice.
-Josh (j...@care.com)
(apologies for the automatic corporate dis
KS> This pull request:
KS> https://github.com/ansible/ansible-modules-core/pull/2673 supposedly
KS> adds MySQL 5.7 support on mysql_user. The last note says it's been
KS> merged into the 2.0 stable and the devel branch, but it's not clear to
KS> me if it means it's in the 2.0 release or the upcomin
We wanted a way to combine static and dynamic inventories with a single
set of inventory variables, and wrote a script to do it; check out
https://github.com/caredotcom/ansible-quartermaster and see if it's any
help (either as-is, or as an example, or for humor value, or whatever).
The other thing you could do is define an empty value in a role default,
if you're in a role. (There doesn't seem to be a way to do that if you're
not in a role, i.e. to define a playbook default that can be overridden by
group or host variables, at least not that I see in the precedence list at
ht
P> I've made a dictionary declaring "apple: 'JameslikesApples'" and on the
P> next line: "banana: 'IwentToSanFrancisco'". I need to be able to
P> reference "JameslikesApples" in a shell command and I just can't see a
P> way around it. I've tried {{ {{ basket }} }} but Ansible doesn't accept
P> the
We wrote a sort of meta-inventory script to do this kind of thing;
https://github.com/caredotcom/ansible-quartermaster might be useful (as
is, as an example, as a warning, etc :^).
(Wanting AWS things things with tag_whatever_foo, and static things in
group 'foo', to both end up in the same Ansibl
RF> Currently I'm doing the following but it doesn't work:
RF>
RF> - name: check if mounted
RF> command: mount | grep
RF> register: result
RF>
RF> - debug: var={{ result.stdout }}
RF>
RF> I get the error:
RF> failed... 'Consider using mount module rather than running mount'...
RF> stderr:
RF>
Hmm, this trivial playbook works for me:
- hosts: localhost
tasks:
- debug: msg="Yep!"
when: server_num < '03'
With '--extra-vars server_num=02', I get
TASK: [debug msg="Yep!"]
**
ok: [localhost] => {
"msg": "Ye
ES> does anyone know or have a clue why ec2.results wouldn't be populated?
Random shots in the dark:
- Is 'ec2' as a variable name clashing with the module name in some way?
What if you do 'register: foo' instead?
- What *is* in 'foo', if you 'debug: var=foo' it? Is it everything you'd
expec
RF> I see. I agree that doing math on strings is somewhat questionable.
Well, strings can be sorted, and compared in that way. I wouldn't bet on
what adding 1 to a string would do, but comparisons seem legit.
http://jinja.pocoo.org/docs/dev/templates/#comparisons is where I found
the comparisons
ES> I did try ec2.instances but it is only add the first host not all
ES> three. I did do a debug on ec2 and ec2.instances and it is showing all
ES> 3 instances that I'm turning up. Any ideas on that. This is only
ES> happening on the add_hosts module. I have a wait for ssh to come up
ES> task and
We have a use case similar to one I've seen in a couple of places, where
(let's say) a web server has a template that needs to contain information
about (let's say) all the app servers that are in their Ansible facts. If
you do 'ap -t web.yml', with a play to gather facts from everyone and a
play t
How does fact caching work with JSON files and expiration time? The
particular weird symptom I'm seeing is that the cache file for a host is
getting written to as various plays run, but the contents of the cache are
stale. If the mtime of the cache file is what determines expiration, it
seems like
PG> Many thanks for this information. For future reference where is this
PG> documented?
https://groups.google.com/forum/#!topic/ansible-project/qHyIjyal_Ic is a
thread where it came up before, which says
you can use a per template header to override this, you can see an
example in the templa
WN> In a Jijna2 template I need a following variable from hostvars.
WN>
WN> hostvars['{{project}}-example.com'].ansible_eth0.ipv4.address
I'm pretty sure something like
hostvars[project + '-example.com'].ansible_eth0.ipv4.address
will work. You might need to bracket-ify the whole thing, like
AS> If I dump hostvars, I can see the information I want does exist, I
AS> just can't convince Google to show me an example to follow.
In general, you want something like
hostvars['server1']['ansible_ssh_host']
for the ansible_ssh_host variable on the host 'server1'; or, if the target
hostname
http://docs.ansible.com/ansible/playbooks_variables.html has some more
docs about this too.
-Josh (j...@care.com)
(apologies for the automatic corporate disclaimer that follows)
This email is intended for the person(s) to whom it is addressed and may
con
BC> The template module does this by default (the diff if ansible is
BC> called with --diff), add a notify handler for the restart and you have
BC> all the steps.
Right, but with JBoss, the destination file may have been changed since
Ansible pushed it out (because JBoss likes to rewrite its XML f
I want to come up with a timestamp for the current time; it doesn't have
to be perfectly accurate, this is just to uniquely name something, but if
I run it twice in a row I want to be pretty sure that the second time will
be later than the previous time. Something like this:
- name: Do something w
We have a task like
- name: install thing and dependencies
yum: name={{ item }} state=present
with_items:
- thing-"{{ thing_version }}"
- dep1
- dep2
- dep3
where thing_version is sometimes 1.0 (say), and sometimes something else.
This worked fine in Ansible 1.9
If the main thing you need is to get inventory from multiple accounts, you
might find ansible-quartermaster to be useful. You could probably use the
'includes' feature to call ec2.py multiple times, with different config
files to use different AWS keys to access your different accounts.
https://git
1 - 100 of 162 matches
Mail list logo