win_path – Manage Windows path environment variables¶
Synopsis¶
- Allows element-based ordering, addition, and removal of Windows path environment variables.
Parameters¶
Notes¶
Note
- This module is for modifying individual elements of path-like environment variables. For general-purpose management of other environment vars, use the win_environment module.
- This module does not broadcast change events. This means that the minority of windows applications which can have their environment changed without restarting will not be notified and therefore will need restarting to pick up new environment settings.
- User level environment variables will require an interactive user to log out and in again before they become available.
See Also¶
See also
- win_environment – Modify environment variables on windows hosts
- The official documentation on the win_environment module.
Examples¶
- name: Ensure that system32 and Powershell are present on the global system path, and in the specified order
win_path:
elements:
- '%SystemRoot%\system32'
- '%SystemRoot%\system32\WindowsPowerShell\v1.0'
- name: Ensure that C:\Program Files\MyJavaThing is not on the current user's CLASSPATH
win_path:
name: CLASSPATH
elements: C:\Program Files\MyJavaThing
scope: user
state: absent
Status¶
- This module is not guaranteed to have a backwards compatible interface. [preview]
- This module is maintained by the Ansible Core Team. [core]
Red Hat Support¶
More information about Red Hat’s support of this module is available from this Red Hat Knowledge Base article.
Authors¶
- Matt Davis (@nitzmahone)
Hint
If you notice any issues in this documentation, you can edit this document to improve it.