# Control node environment & plugins

**URL:** <https://forum.ansible.com/t/control-node-environment-plugins/36630>\
**Category:** Ansible Project\
**Created:** [May 15, 2022, 10:19pm UTC](https://forum.ansible.com/t/control-node-environment-plugins/36630 "2022-05-15T22:19:06Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gabriel\_Canton](https://avatars.discourse-cdn.com/v4/letter/g/ee59a6/32.png) [@Gabriel\_Canton](https://forum.ansible.com/u/Gabriel_Canton)\
**Post date:** [May 15, 2022, 10:19pm UTC](https://forum.ansible.com/t/control-node-environment-plugins/36630/1 "2022-05-15T22:19:06Z")

</div>

Hi community! I have a simple, newbie question related to setting the environment for plugins. This playbook illustrates my problem:

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [May 19, 2022, 1:33pm UTC](https://forum.ansible.com/t/control-node-environment-plugins/36630/2 "2022-05-19T13:33:00Z")

</div>

The 'environment' keyword ONLY applies to the modules, all other  
lookups share the controller environment and cannot be modified  
inline.

---

<div class="post-metadata">

**Author:** ![Gabriel\_Canton](https://avatars.discourse-cdn.com/v4/letter/g/ee59a6/32.png) [@Gabriel\_Canton](https://forum.ansible.com/u/Gabriel_Canton)\
**Post date:** [May 21, 2022, 6:18pm UTC](https://forum.ansible.com/t/control-node-environment-plugins/36630/3 "2022-05-21T18:18:04Z")

</div>

Thanks for your answer Brian! So you say there’s no way? It doesn’t have to be inline in the task itself. If there’s some task that can modify the controller environment beforehand that’s good enough…

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [May 24, 2022, 1:57pm UTC](https://forum.ansible.com/t/control-node-environment-plugins/36630/4 "2022-05-24T13:57:14Z")

</div>

no such facility exists, each task runs in a fork so even if you  
change the environment successfully with a action plugin, it would not  
persist for the next task.

---

<div class="post-metadata">

**Author:** ![Gabriel\_Canton](https://avatars.discourse-cdn.com/v4/letter/g/ee59a6/32.png) [@Gabriel\_Canton](https://forum.ansible.com/u/Gabriel_Canton)\
**Post date:** [May 24, 2022, 10:09pm UTC](https://forum.ansible.com/t/control-node-environment-plugins/36630/5 "2022-05-24T22:09:08Z")

</div>

I was kind of expecting something like that… It’s a pity, but thanks a lot for clarifying this!
