local_action together with run_once?

112 views
Skip to first unread message

luka.do...@gmail.com

unread,
Aug 4, 2014, 4:21:56 AM8/4/14
to ansible...@googlegroups.com
Hi there,

is there any way to run a local_action task only once?
I tried the following but it doesn't work:

- name: gather public keys to be installed
  local_action
: shell cat public-keys/*.pub
  run_once: true
  changed_when: False
  sudo: False
  register: keys

Is this possible at all?

Cheers
Luka

Michael DeHaan

unread,
Aug 4, 2014, 8:08:51 AM8/4/14
to ansible...@googlegroups.com
(A) what version of Ansible are you using?  This feature is new in 1.7 - I'm going to verify this is referenced as such in the docs now, since that's come up before.

(B) If you are on the development branch, when you say it didn't work, what does that mean?





--
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/301c13f9-2eea-46c7-b545-c5281970b462%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages