Change username used for VM once they have joined the domain

This commit is contained in:
abrown38 committed 2024-08-23 09:05:35 +01:00
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