get rc powershell test6

This commit is contained in:
2025-11-06 13:05:29 +01:00
parent 83f3907bee
commit 2a414d60d2

View File

@@ -5,10 +5,15 @@
tasks: tasks:
- name: On execute la commande "{{ command }}" - name: On execute la commande "{{ command }}"
ansible.windows.win_shell: "{{ powershell_path }} {{ command }}" ansible.windows.win_powershell:
args: script: "{{ command }}"
chdir: "{{ execution_path }}" chdir: "{{ execution_path }}"
register: ps_script executable: pwsh.exe
arguments:
- -ExecutionPolicy
- ByPass
register: pwsh_output
failed_when:
- pwsh_output.output[0] != 7
- debug: - debug:
msg: "{{ ps_script }}" msg: "{{ pwsh_output }}"