get rc powershell test6
This commit is contained in:
@@ -5,10 +5,15 @@
|
||||
tasks:
|
||||
|
||||
- name: On execute la commande "{{ command }}"
|
||||
ansible.windows.win_shell: "{{ powershell_path }} {{ command }}"
|
||||
args:
|
||||
ansible.windows.win_powershell:
|
||||
script: "{{ command }}"
|
||||
chdir: "{{ execution_path }}"
|
||||
register: ps_script
|
||||
|
||||
executable: pwsh.exe
|
||||
arguments:
|
||||
- -ExecutionPolicy
|
||||
- ByPass
|
||||
register: pwsh_output
|
||||
failed_when:
|
||||
- pwsh_output.output[0] != 7
|
||||
- debug:
|
||||
msg: "{{ ps_script }}"
|
||||
msg: "{{ pwsh_output }}"
|
||||
Reference in New Issue
Block a user