win_environment module

27 views
Skip to first unread message

Shmulik Alfandari

unread,
Feb 3, 2016, 9:51:00 AM2/3/16
to Ansible Project
Hi,

I am trying to add specific path to the Path Environment Variables on windows hosts using win_environment module
The problem is that this module can only add new variable or delete existing one, it's impossible to add something to existing variable.

Is there any other way to update Path Environment Variables on windows hosts?

Thanks,
Shmulik.
 

J Hawkesworth

unread,
Feb 8, 2016, 9:37:20 AM2/8/16
to Ansible Project
Hi, 

You could use the script module and just add to the path that way.

But the module is this way for a reason.  To me, I want to take control of exactly what is configured on machines.  So when I look at my playbooks I can know exactly what the PATH is set to on all machines that the playbook applies to.

Perhaps you are trying to acheive something where this needs to be different on each machine though?

What is it you need to do?

Jon (module author)
Reply all
Reply to author
Forward
0 new messages