ansible / ansible.builtin / v2.3.3.0-1 / module / win_environment Modifies environment variables on windows hosts. | "added in version" 2.0 of ansible.builtin" Authors: Jon Hawkesworth (@jhawkesworth) preview | supported by communityansible.builtin.win_environment (v2.3.3.0-1) — module
pip
Install with pip install ansible==2.3.3.0.post1
Uses .net Environment to set or remove environment variables and can set at User, Machine or Process level.
User level environment variables will be set, but not available until the user has logged off and on again.
name: default: no default description: - The name of the environment variable required: true level: choices: - machine - process - user default: no default description: - The level at which to set the environment variable. - Use 'machine' to set for all users. - Use 'user' to set for the current user that ansible is connected as. - Use 'process' to set for the current process. Probably not that useful. required: true state: choices: - present - absent default: present description: - present to ensure environment variable is set, or absent to ensure it is removed required: false value: default: no default description: - The value to store in the environment variable. Can be omitted for state=absent required: false