From ca2bd9cbc7026d8a25c67beb6805f1693b14c0e4 Mon Sep 17 00:00:00 2001 From: L3D Date: Sun, 17 Sep 2023 14:32:37 +0200 Subject: [PATCH] fix runas instruction --- handlers/main.yml | 2 +- tasks/other_user_pubkeys.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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 }}'