fix: skip build if tool is already installed
This commit is contained in:
parent
6ee4535a0a
commit
fd5dca31a2
@ -2,8 +2,26 @@
|
|||||||
- name: Gather variables for each operating system
|
- name: Gather variables for each operating system
|
||||||
include_vars: "{{ ansible_distribution | lower }}.yml"
|
include_vars: "{{ ansible_distribution | lower }}.yml"
|
||||||
|
|
||||||
|
- name: "Get Podman version"
|
||||||
|
become: yes
|
||||||
|
become_user: podman_rootless
|
||||||
|
ansible.builtin.shell: "echo v$(podman --version | cut -d' ' -f 3)"
|
||||||
|
register: podman_active_version
|
||||||
|
changed_when: false
|
||||||
|
failed_when: false
|
||||||
|
when: podman_version_check|bool
|
||||||
|
environment:
|
||||||
|
XDG_RUNTIME_DIR=/run/user/2534
|
||||||
|
|
||||||
|
- name: "test"
|
||||||
|
debug:
|
||||||
|
msg: "{{ podman_active_version }}"
|
||||||
|
|
||||||
- include_tasks: setup_user.yml
|
- include_tasks: setup_user.yml
|
||||||
|
when: (not podman_version_check|bool) or (podman_active_version.stdout != podman_version)
|
||||||
|
|
||||||
- include_tasks: install.yml
|
- include_tasks: install.yml
|
||||||
|
when: (not podman_version_check|bool) or (podman_active_version.stdout != podman_version)
|
||||||
|
|
||||||
- include_tasks: systemd-services.yml
|
- include_tasks: systemd-services.yml
|
||||||
|
when: (not podman_version_check|bool) or (podman_active_version.stdout != podman_version)
|
||||||
|
Loading…
Reference in New Issue
Block a user