mirror of
https://git.ecdf.ed.ac.uk/win_automation/windows-ansible.git
synced 2026-10-26 13:17:21 +00:00
Change username used for VM once they have joined the domain
This commit is contained in:
1 parent
475fd70126
commit
7b6450a1c2
2 files changed
+15
-1
No files matched your search
@@ -1,2 +1,3 @@
|
||||
---
|
||||
- import_tasks: join.yml
|
||||
- import_tasks: join.yml
|
||||
- import_tasks: username.yml
|
||||
@@ -0,0 +1,13 @@
|
||||
---
|
||||
- name: Swap to domain Administrator
|
||||
tags:
|
||||
- change_username
|
||||
- always
|
||||
vars:
|
||||
ansible_connection: local
|
||||
lineinfile:
|
||||
path: /deployments/{{ os_project }}-{{ win_project }}/ansible/vars/connection.yml
|
||||
regexp: '^ansible_user:'
|
||||
line: 'ansible_user: {{ win_project|upper }}\Administrator'
|
||||
delegate_to: localhost
|
||||
run_once: True
|
||||
Reference in new issue
Block a user