1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00

Dynamically extract php_version & python_version

This commit is contained in:
root 2022-12-21 19:29:04 -05:00
parent 2408a08aa9
commit cc659d0837
17 changed files with 113 additions and 77 deletions

View file

@ -7,13 +7,14 @@
# Higher-level purpose explained at the bottom of:
# https://github.com/iiab/iiab/blob/master/vars/default_vars.yml
- name: "Ansible just ran /etc/ansible/facts.d/local_facts.fact to set 14 vars -- here we extract 5 of those -- iiab_stage: {{ ansible_local.local_facts.stage }}, rpi_model: {{ ansible_local.local_facts.rpi_model }}, devicetree_model: {{ ansible_local.local_facts.devicetree_model }}, os_ver: {{ ansible_local.local_facts.os_ver }}, python_ver: {{ ansible_local.local_facts.python_ver }}"
- name: "Ansible just ran /etc/ansible/facts.d/local_facts.fact to set 15 vars -- here we extract 6 of those -- iiab_stage: {{ ansible_local.local_facts.stage }}, rpi_model: {{ ansible_local.local_facts.rpi_model }}, devicetree_model: {{ ansible_local.local_facts.devicetree_model }}, os_ver: {{ ansible_local.local_facts.os_ver }}, python_version: {{ ansible_local.local_facts.python_version }}, php_version: {{ ansible_local.local_facts.php_version }}"
set_fact:
iiab_stage: "{{ ansible_local.local_facts.stage }}"
rpi_model: "{{ ansible_local.local_facts.rpi_model }}"
devicetree_model: "{{ ansible_local.local_facts.devicetree_model }}"
os_ver: "{{ ansible_local.local_facts.os_ver }}"
python_ver: "{{ ansible_local.local_facts.python_ver }}"
python_version: "{{ ansible_local.local_facts.python_version }}"
php_version: "{{ ansible_local.local_facts.php_version }}"
# Initialize /etc/iiab/iiab.ini writing the 'location' and 'version' sections
# once and only once, to preserve the install date and git hash.
@ -96,8 +97,10 @@
value: "{{ devicetree_model }}"
- option: os_ver
value: "{{ os_ver }}"
- option: python_ver
value: "{{ python_ver }}"
- option: python_version
value: "{{ python_version }}"
- option: php_version
value: "{{ php_version }}"
- option: first_run
value: "{{ first_run }}"
- option: local_tz # e.g. 'EDT' (summer) or 'EST' (winter) after Ansible interprets symlink /etc/localtime -- or 'UTC' if /etc/localtime doesn't exist