get rc powershell test6
This commit is contained in:
@@ -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 }}"
|
||||||
Reference in New Issue
Block a user