Update to 2022-01-30 11:00

This commit is contained in:
Daniel Berteaud
2022-01-30 11:00:05 +01:00
parent 013c387bca
commit 1c2a883ec4
7 changed files with 127 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
---
# Load distribution specific variables
- include_vars: "{{ item }}"
with_first_found:
- "{{ role_path }}/vars/{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yml"
- "{{ role_path }}/vars/{{ ansible_os_family }}-{{ ansible_distribution_major_version }}.yml"
- "{{ role_path }}/vars/{{ ansible_distribution }}.yml"
- "{{ role_path }}/vars/{{ ansible_os_family }}.yml"
tags: clojure
- name: Set default install mode
set_fact: clojure_install_mode='none'
tags: clojure
- name: Check if clojure is installed
stat: path=/usr/local/bin/clojure
register: clojure_bin
changed_when: False
tags: clojure
- name: Set install mode to install
set_fact: clojure_install_mode='install'
when: not clojure_bin.stat.exists
tags: clojure
- name: Detect installed version
block:
- shell: clojure --version | perl -ne 'm/version\s(\d+(\.\d+)*)/ && print "$1"'
register: clojure_current_version
- set_fact: clojure_current_version={{ clojure_current_version.stdout }}
tags: clojure
- name: Set install mode to upgrade
set_fact: clojure_install_mode='upgrade'
when: clojure_current_version != clojure_version
tags: clojure