New in version 2.4.
The letter of the network path to map to.
This letter must not already be in use with Windows.
The password for
The UNC path to map the drive to.
This is required if
Credentials to map the drive with.
The username MUST include the domain or servername like SERVER\user, see the example for more information.
- name: create a mapped drive under Z win_mapped_drive: letter: Z path: \\domain\appdata\accounting - name: delete any mapped drives under Z win_mapped_drive: letter: Z state: absent - name: only delete the mapped drive Z if the paths match (error is thrown otherwise) win_mapped_drive: letter: Z path: \\domain\appdata\accounting state: absent - name: create mapped drive with local credentials win_mapped_drive: letter: M path: \\SERVER\c$ username: SERVER\Administrator password: Password - name: create mapped drive with domain credentials win_mapped_drive: letter: M path: \\domain\appdata\it username: DOMAIN\IT password: Password