diff --git a/handlers/main.yml b/handlers/main.yml index c15f446..17630ca 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -5,7 +5,7 @@ - name: 'Install SSH User Keys' ansible.windows.win_shell: 'C:\Users\{{ win_sshd_otheruser }}\.ansible\ssh_userkeys.ps1' become: true - become_method: runas + become_method: ansible.builtin.runas become_user: "{{ win_sshd_otheruser }}" vars: ansible_become_pass: '{{ win_sshd_otherusepassword }}' diff --git a/tasks/other_user_pubkeys.yml b/tasks/other_user_pubkeys.yml index 7a522e4..2542cf1 100644 --- a/tasks/other_user_pubkeys.yml +++ b/tasks/other_user_pubkeys.yml @@ -4,7 +4,7 @@ script: "[System.IO.Directory]::CreateDirectory('{{ item }}')" changed_when: _fw.changed become: true - become_method: runas + become_method: ansible.builtin.runas become_user: "{{ win_sshd_otheruser }}" vars: ansible_become_pass: '{{ win_sshd_otherusepassword }}' @@ -16,7 +16,7 @@ script: "attrib +h {{ item }}" changed_when: _fw.changed become: true - become_method: runas + become_method: ansible.builtin.runas become_user: "{{ win_sshd_otheruser }}" vars: ansible_become_pass: '{{ win_sshd_otherusepassword }}'