18 lines
370 B
YAML
18 lines
370 B
YAML
---
|
|
- name: Execute Powershell Command
|
|
hosts: all
|
|
|
|
tasks:
|
|
|
|
- name: On execute la commande "{{ command }}"
|
|
ansible.windows.win_powershell:
|
|
script: "{{ command }}"
|
|
chdir: "{{ execution_path }}"
|
|
executable: pwsh.exe
|
|
arguments:
|
|
- -ExecutionPolicy
|
|
- ByPass
|
|
register: pwsh_output
|
|
|
|
- debug:
|
|
msg: "{{ pwsh_output }}" |