Files
ansible-project/execute_command_ps.yml
2025-11-06 11:58:08 +01:00

14 lines
312 B
YAML

---
- name: Execute Powershell Command
hosts: all
tasks:
- name: On execute la commande "{{ command }}"
ansible.windows.win_powershell:
script: "{{ command }}"
chdir: "{{ execution_path }}"
register: ps_script
failed_when: ps_script.rc != 0
debug:
msg: "{{ ps_script }}"