Initial commit of roles-refactor branch
This commit is contained in:
11
roles/arch_update/tasks/python_check.yaml
Normal file
11
roles/arch_update/tasks/python_check.yaml
Normal file
@@ -0,0 +1,11 @@
|
||||
---
|
||||
- name: Run Python version command
|
||||
ansible.builtin.shell:
|
||||
cmd: python --version | grep -Po '\d+\.\d+'
|
||||
register: _temp_python_version
|
||||
changed_when: false
|
||||
|
||||
- name: Assign version to dynamic variable
|
||||
ansible.builtin.set_fact:
|
||||
"{{ target_var }}": "{{ _temp_python_version.stdout }}"
|
||||
|
||||
Reference in New Issue
Block a user