Which statement is true

27 views
Skip to first unread message

Tiglath

unread,
Oct 17, 2014, 1:45:58 PM10/17/14
to ansible...@googlegroups.com
 
 
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: appservers

tasks:

- name: Get the latest release.

  local_action: shell grep app /tmp/releases | cut -f2 -d':' | tr -d "," | tr -d "'"

  register: rel

  run_once: true
 

ERROR: run_once is not a legal parameter in an Ansible task or handler

Or 2: 

Run Once

New in version 1.7.

In some cases there may be a need to only run a task one time and only on one host. This can be achieved by configuring “run_once” on a task:

---
# ...

  tasks:

    # ...

    - command: /opt/application/upgrade_db.py
      run_once: true

    # ...

Michael Peters

unread,
Oct 17, 2014, 3:01:16 PM10/17/14
to ansible...@googlegroups.com
What version of ansible are you running?
> --
> 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/49998d77-13ba-40c4-b885-7063ecc767cf%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Tiglath

unread,
Oct 17, 2014, 3:06:00 PM10/17/14
to ansible...@googlegroups.com

 
 
Forgive this blind man...    
 
Thanks
Reply all
Reply to author
Forward
0 new messages