# local\_action together with run\_once?

**URL:** <https://forum.ansible.com/t/local-action-together-with-run-once/15847>\
**Category:** Ansible Project\
**Created:** [August 4, 2014, 8:21am UTC](https://forum.ansible.com/t/local-action-together-with-run-once/15847 "2014-08-04T08:21:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![luka.dornhecker](https://avatars.discourse-cdn.com/v4/letter/l/df788c/32.png) [@luka.dornhecker](https://forum.ansible.com/u/luka.dornhecker)\
**Post date:** [August 4, 2014, 8:21am UTC](https://forum.ansible.com/t/local-action-together-with-run-once/15847/1 "2014-08-04T08:21:56Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [August 4, 2014, 12:08pm UTC](https://forum.ansible.com/t/local-action-together-with-run-once/15847/2 "2014-08-04T12:08:47Z")

</div>

(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?
