You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/test/integration/targets/powershell-controller/tasks/main.yml

25 lines
804 B

- name: Find pwsh on PATH
command: which pwsh
register: pwsh_location
ignore_errors: yes
- when: pwsh_location is success
block:
- name: Get pwsh version
command: "{{ pwsh_location.stdout | trim | quote }} --version"
register: pwsh_version
- name: Show pwsh location and version
debug:
msg: "{{ pwsh_location.stdout | trim }} is {{ pwsh_version.stdout | trim }}"
- when: ansible_pwsh_interpreter is defined
block:
- name: Get ansible_pwsh_interpreter version
command: "{{ ansible_pwsh_interpreter | quote }} --version"
register: ansible_pwsh_interpreter_version
- name: Show ansible_pwsh_interpreter location and version
debug:
msg: "{{ ansible_pwsh_interpreter }} is {{ ansible_pwsh_interpreter_version.stdout | trim }}"