- name: Step1. notify on this stepshell: echo "Step1"notify: Run handler- name: Fail by forcefail: msg="failing"- name: Next stepshell: echo "next step"
[kbroughton@mb-kbroughton:git/test_ansible +(master)] ansible-playbook -i hosts force_handlers.yml --force-handlers -e "cli_arg=yes"PLAY [all] ********************************************************************GATHERING FACTS ***************************************************************ok: [localhost]TASK: [force_handlers | Step1. notify on this step] **************************changed: [localhost]TASK: [force_handlers | Fail by force] ****************************************failed: [localhost] => {"failed": true}msg: failingNOTIFIED: [force_handlers | Run handler] **************************************FATAL: no hosts matched or all hosts have already failed -- abortingI expected the handler to run here instead of the "FATAL".PLAY RECAP ********************************************************************to retry, use: --limit @/Users/kbroughton/force_handlers.retrylocalhost : ok=2 changed=1 unreachable=0 failed=1I'm running on a fresh pull of trunk
- using ansible to deploy war to stage/qa env - 2 Updates
- How can I create a path variable containing a timestamp? - 3 Updates
- Where to put a custom lookup plugin? - 1 Update
- Best practices for using Ansible with and without Vagrant - 2 Updates
- apt module reporting changes when there are none - 1 Update
- Parentheses in lineinfile line argument - 1 Update
- YAML formatting best practices - tasks with many params - 7 Updates
- Details regarding the update_homebrew option - 3 Updates
- Use items from task condition in template - 2 Updates
- Working with with_items and some filter - 4 Updates
- Symbolic file modes now supported in relevant modules - 2 Updates
- passing non-string variable to module - 2 Updates
- [Ansible to Windows] IndexError: tuple index out of range - 2 Updates
- How to copy a file between two machines using ansible - 2 Updates
- Ansible Galaxy better GFM support - 2 Updates
- Ubuntu Controller with Windows Host - 2 Updates
- Access register array defined in one host group from another host group - 7 Updates
- Request to improve RDS module to use boto rds2 - 1 Update
- Ansible - win_get_url copy file from network share - 1 Update
- Roles with multiple OS versions - 4 Updates
Jordi Funollet <funo...@fastmail.fm>: Aug 26 03:41PM +0200
With this schema,
inventory/production # inventory file for production serv
ers
inventory/stage # inventory file for stage environme
nt
...more
Tomasz Kontusz <tomasz....@gmail.com>: Aug 26 06:24PM +0200
>group2 # ""
>can vars have different values on every environment? Or must
>group names be different on every environment?
You'd have to have different group names, or move the ...more
Sankalp Khare <sankal...@gmail.com>: Aug 26 02:58AM -0700
Doesn't seem to work for me:
failed: [ec2-23-20-215-207.compute-1.amazonaws.com] => {"changed": true,
"cmd": "tar -cf $PIPE(date +%Y%m%d-%H%M%S).tar file1", "delta":
"0:00:00.007156", "end": ...more
Michael DeHaan <mic...@ansible.com>: Aug 26 08:45AM -0400
Yeah that's an easy one, fortunately!
That above thread that is well over a year and a half old, using some
syntax in Ansible that is quite out of date, and legacy syntaxes like that ...more
Tomasz Kontusz <tomasz....@gmail.com>: Aug 26 06:17PM +0200
Wouldn't the value change in the course of a play?
--
Wysłane za pomocą K-9 Mail.
...more
Andrew Cholakian <andr...@gmail.com>: Aug 26 09:03AM -0700
I need to use a custom lookup plugin to pull our JSON customer database
from s3. I have two questions:
1. Where in the file structure should the file go
2. Can a lookup plugin return a complex ...more
Jeff Geerling <geerl...@gmail.com>: Aug 26 06:56AM -0700
Nice script, I hadn't seen that until now, but will likely start using it
for a few of my setups.
Just wanted to chime in and say that for 99% of the infrastructure I
manage, I just have on Git ...more
kesten broughton <kesten.b...@gmail.com>: Aug 26 07:51AM -0700
For this particular problem (calling on every vm) i use a trick i found
online: only include the ansible provision call in the last vm in the
Vagrantfile in is provider section.
...more
Jeff Geerling <geerl...@gmail.com>: Aug 26 07:48AM -0700
That was exactly the problem; the `libz-dev` package was causing the false
'changed' status.
$ aptitude search libz-dev
v libz-dev - ...more
Matteo Ceccarello <matteo.c...@gmail.com>: Aug 26 06:57AM -0700
Hi all!
I'm trying to use the lineinfile module to configure NFS exports and I need
to put parentheses in my line argument.
If I do something like this
- name: Export the NFS directory for ...more
Michael DeHaan <mic...@ansible.com>: Aug 25 04:06PM -0400
But Ansible playbooks are not Python, nor do we assume folks will need to
know Python.
Further, these are not statements, but parameters, which are *commonly* if
not always placed on one line.
...more
Josh Smift <j...@care.com>: Aug 25 04:13PM -0400
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 ...more
Michael DeHaan <mic...@ansible.com>: Aug 25 04:25PM -0400
Yep, style is a team thing.
Part of this discussion was because Jeff is writing a book, I would prefer
if we didn't advocate that simple key=value on one line was a bad practice ...more
Jeff Geerling <geerl...@gmail.com>: Aug 25 01:33PM -0700
On Monday, August 25, 2014 3:25:04 PM UTC-5, Michael DeHaan wrote:
> should encourage
> structured args versus splitting on a line, since there's going to a point
> where that's needed.
...more
Jeff Geerling <geerl...@gmail.com>: Aug 25 01:36PM -0700
Also, one other thing I forgot to mention, LeanPub in particular, and most
other publishers as well, has a hard limit of 78-81 characters per line for
an 8x10 book, so parameter-per-line works out ...more
Michael DeHaan <mic...@ansible.com>: Aug 25 05:25PM -0400
No 4px fonts?
On Mon, Aug 25, 2014 at 4:36 PM, Jeff Geerling <geerl...@gmail.com>
wrote:
...more
Jeff Geerling <geerl...@gmail.com>: Aug 26 06:40AM -0700
Haha, believe me, I've tried a lot of tricks to see how much I could fit on
a line :)
On Monday, August 25, 2014 4:25:05 PM UTC-5, Michael DeHaan wrote:
...more
Dan Bohea <dbo...@gmail.com>: Aug 26 04:22AM -0700
I have a question about the homebrew module.
Consider the following task:
- name: Install rbenv & ruby-build
homebrew: name={{ item }} update_homebrew=yes
with_items:
- rbenv ...more
Michael DeHaan <mic...@ansible.com>: Aug 26 08:48AM -0400
I would just call update_homebrew on the first task.
Many of our modules, such as apt, allow updating the cache without
installing a package, which makes a first step somewhat cleaner.
...more
Dan Bohea <dbo...@gmail.com>: Aug 26 05:50AM -0700
Thanks for the advice.
...more
Sergei Antipov <greenda...@gmail.com>: Aug 26 03:40AM -0700
Hello.
Please tell me how I can use items from task condition in template. Or
other method, how I can decide my probled.
goal: I have a template for /etc/network/interfaces file. ...more
Michael DeHaan <mic...@ansible.com>: Aug 26 08:47AM -0400
I'm not sure what you mean you say "use items from the task condition", but
you can in fact use conditionals with your template.
Take a look at the Jinja2 documentation, and you'll see things like ...more
Bastian Bringenberg <avalario...@googlemail.com>: Aug 25 11:58AM -0700
I am not able to figure out which array position is important for the
current item as:
hosts:
* 1 - noApplication ( ID = 3 )
* 2 - Application ( ID = 2 )
* 3 - Application ( ID = 42 )
...more
Michael DeHaan <mic...@ansible.com>: Aug 25 06:26PM -0400
Sorry, I'm no following the above.
Can we step back a moment?
This appears to be a playbook that fixes various things in particular git
directories, if found, for a very large number of git ...more
Bastian Bringenberg <avalario...@googlemail.com>: Aug 26 08:17AM +0200
Okay =).
I could write it down in some kind of PHP so you get my point.
I have got:
hosts:
- name: "domain.tld"
database:
name: test
user: test
pw: test ...more
Michael DeHaan <mic...@ansible.com>: Aug 26 08:42AM -0400
Not really.
Is the issue you have a delegated host action that you only want to run
once?
If so you could factor this out to an action that happens last in the
playbook.
...more
James Cammarata <jcamm...@ansible.com>: Aug 25 11:47PM -0500
Hi all, just wanted to announce that I've merged in a PR from Paulo
Bittencourt that allows the use of symbolic modes for modules like file,
copy and template. For example:
- name: create a new ...more
Michael DeHaan <mic...@ansible.com>: Aug 26 08:39AM -0400
I'm not sure we're ready for this one as I'd like to have a bit more
discussion on it first. Maybe it's ok.
(A) I see this is not implemented as a type='dict' sort of thing.
file: ...more
Ayelet Goldin <ayelet...@gmail.com>: Aug 25 05:47PM -0700
I can't do this "correctly" inside the module since it's meant to be a
flexible variable.
My problem with
module_name:
foo: "{{ x }}"
is that I would like to use variables within foo ...more
Michael DeHaan <mic...@ansible.com>: Aug 26 08:33AM -0400
If you file a github ticket, we can do some digging about variable type
preservation.
Though I still recommend in the argument_spec a "type="int"" or casting in
your particular module, it makes ...more
Chris Church <flyin...@gmail.com>: Aug 24 09:39PM -0400
The IndexError traceback was fixed by
https://github.com/ansible/ansible/commit/07f12539eee2faac5fe831cd31f1f0a5d3e7e661,
and I just pushed a fix for running windows modules from playbooks ( ...more
Michael DeHaan <mic...@ansible.com>: Aug 26 08:30AM -0400
Thanks Chris!
...more
Naween Ghimire <naween...@gmail.com>: Aug 26 05:09AM -0700
I need to copy file form machine A to machine B whereas my control machine
from where i run all my ansible tasks is machine C(local machine).
I have tried the following
use scp command in ...more
Michael DeHaan <mic...@ansible.com>: Aug 26 08:28AM -0400
Definitely don't invoke a scp from a shell module, as ansible is not meant
to manually call ssh in a nested call to another ssh activity, and that
will cause all forms of confusion.
...more
Takeshi Yaegashi <yaeg...@debian.org>: Aug 25 02:04AM -0700
Hello project,
Recently I've made my first submission in Ansible Galaxy:
https://galaxy.ansible.com/list#/roles/1475
Unfortunately the page above failed to render the module option table in ...more
Michael DeHaan <mic...@ansible.com>: Aug 26 08:25AM -0400
Perhaps -- it's been requested before.
Right now we're using all of our resources on the ansible core project
since I think that does the most good, though the time will come in the ...more
Michael DeHaan <mic...@ansible.com>: Aug 25 06:29PM -0400
Per another thread on this list, downgrading winrm is the temporary answer.
The issue needs to be brought up with wirm upstream.
See the thread entitled "[Ansible to Windows] IndexError: tuple ...more
Chris Church <flyin...@gmail.com>: Aug 24 10:23PM -0400
The latest pywinrm (as of
https://github.com/diyan/pywinrm/commit/1bb5ee32a559624f9e2c08ba3b1b2f4bdf0d8bcb)
has issues when using the winrm.Session class and the URL contains an IP ...more
Imran Khan <khan.im...@gmail.com>: Aug 25 10:35PM -0700
Hello, is it possible to do the following
- hosts: localhost
gather_facts: False
tasks:
#
#
- name: create new IP Addresses ...more
Henry Finucane <h.fin...@gmail.com>: Aug 25 10:37PM -0700
Probably something like
hostvars[groups['webservers']|first].new_ips
--
-----------------------
| Henry Finucane
| "I hear aphorisms are popular"
-----------------------
...more
Imran Khan <khan.im...@gmail.com>: Aug 25 11:02PM -0700
You mean hostvars[groups['localhost']|first.new_ips
Doesn't work!
On Monday, August 25, 2014 10:37:57 PM UTC-7, Henry Finucane wrote:
...more
Imran Khan <khan.im...@gmail.com>: Aug 25 11:14PM -0700
{{hostvars[groups['localhost'].new_ips.results.stdout}}
Gives the following error: One or more undefined variables: 'dict object'
has no attribute 'localhost'
On Monday, August 25, 2014 ...more
Henry Finucane <h.fin...@gmail.com>: Aug 25 11:27PM -0700
You know what- I answered your title, not your question. If you don't
want to have to try and persist things between plays, you might have
more luck with something like this:
- hosts: myhosts ...more
Imran Khan <khan.im...@gmail.com>: Aug 25 11:39PM -0700
haha.....okay! I did not want to post my whole playbook as it might get
confusing. I really do appreciate your help though. Here is a sizeable
chunk of the playbook which might make things easy ...more
Imran Khan <khan.im...@gmail.com>: Aug 25 11:41PM -0700
haha.....okay! I did not want to post my whole playbook as it might get
confusing. I really do appreciate your help though. Here is a sizeable
chunk of the playbook which might make things easy ...more
Michael DeHaan <mic...@ansible.com>: Aug 25 06:24PM -0400
"we can deprecate old Ansible conventions, but when do we deprecate old
boto libraries?"
Generally each module is responsible for yelling if it tries to do
something it cannot.
...more
Damon Overboe <damon....@gmail.com>: Aug 25 02:33PM -0500
Jon,
If you can find the correct group for accessing with a domain account,
please let us know.
Using trond's script, I'm able to connect using an admin account local to
the box, but the ...more
Tomasz Kontusz <tomasz....@gmail.com>: Aug 25 07:20PM +0200
>because
>group_by is not idempotent. This bothers the idempotence purist in me
>:)
Oh, it's as idempotent as you can get. But you are right, it's a pretty useless change notification - you can ...more
Michael DeHaan <mic...@ansible.com>: Aug 25 01:31PM -0400
"Thanks for your suggestion. That does work, but as you said, ansible still
evaluates and skips all the tasks if the when: condition evaluates to
false. With a long task list that results in a lot ...more
Michael DeHaan <mic...@ansible.com>: Aug 25 01:32PM -0400
It's entirely idempotent (which is a confusing word BTW) -- it doesn't make
any changes when no changes need to be made.
F(x) = F(F(x))
However, it does return a changed boolean because it ...more
Anand Buddhdev <arh...@gmail.com>: Aug 25 09:30PM +0200
On 25 August 2014 19:20, Tomasz Kontusz <tomasz....@gmail.com> wrote:
Hey Tomasz,
>>group_by is not idempotent. This bothers the idempotence purist in me
>>:)
> Oh, it's as idempotent as ...more
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to ansible-proje...@googlegroups.com.
--
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-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAO2fFsV37R%3DL0UFrAWeAc6-M-Y-J8cJ74fsn7tZRH%2Bms16b%3DBA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.