mirror of
https://github.com/iiab/iiab.git
synced 2025-02-14 20:22:08 +00:00
cherry-pick f6ddc8ecfb
This commit is contained in:
parent
d981d55fde
commit
ff626df2f4
1 changed files with 34 additions and 29 deletions
|
@ -6,8 +6,9 @@
|
|||
|
||||
# set top level variables from local facts for convenience
|
||||
- set_fact:
|
||||
xo_model: '{{ ansible_local["local_facts"]["xo_model"] }}'
|
||||
phplib_dir: '{{ ansible_local["local_facts"]["phplib_dir"] }}'
|
||||
xo_model: '{{ ansible_local.local_facts.xo_model }}'
|
||||
phplib_dir: '{{ ansible_local.local_facts.phplib_dir }}'
|
||||
iiab_stage: '{{ ansible_local.local_facts.stage }}'
|
||||
|
||||
- name: Set exFAT enabled for XO laptops
|
||||
set_fact:
|
||||
|
@ -46,33 +47,6 @@
|
|||
file: path=/tmp/heart-beat.txt
|
||||
state=absent
|
||||
|
||||
- name: add version section
|
||||
ini_file: dest='{{ iiab_config_file }}'
|
||||
section=runtime
|
||||
option='{{ item.option }}'
|
||||
value='{{ item.value }}'
|
||||
with_items:
|
||||
- option: 'runtime_branch'
|
||||
value: '{{ ansible_local["local_facts"]["iiab_branch"] }}'
|
||||
- option: 'runtime_commit'
|
||||
value: '{{ ansible_local["local_facts"]["iiab_commit"] }}'
|
||||
- option: 'runtime_date'
|
||||
value: '{{ ansible_date_time["iso8601"] }}'
|
||||
- option: 'runtime_php'
|
||||
value: '{{ phplib_dir }}'
|
||||
- option: 'kernel'
|
||||
value: '{{ ansible_kernel }}'
|
||||
- option: 'memory_mb'
|
||||
value: '{{ ansible_memtotal_mb }}'
|
||||
- option: 'swap_mb'
|
||||
value: '{{ ansible_swaptotal_mb }}'
|
||||
- option: 'product_id'
|
||||
value: '{{ ansible_product_uuid }}'
|
||||
- option: 'gw_active'
|
||||
value: '{{ gw_active }}'
|
||||
- option: 'internet_available'
|
||||
value: '{{ internet_available }}'
|
||||
|
||||
# Put all computed vars here so derive properly from any prior var file
|
||||
- name: If the TZ is not set in env, set it to UTC
|
||||
set_fact: local_tz='UTC'
|
||||
|
@ -176,3 +150,34 @@
|
|||
set_fact:
|
||||
is_CentOS: True
|
||||
when: ansible_distribution == "CentOS"
|
||||
|
||||
- name: add version section
|
||||
ini_file: dest='{{ iiab_config_file }}'
|
||||
section=runtime
|
||||
option='{{ item.option }}'
|
||||
value='{{ item.value }}'
|
||||
with_items:
|
||||
- option: 'iiab_stage'
|
||||
value: '{{ iiab_stage }}'
|
||||
- option: 'runtime_php'
|
||||
value: '{{ phplib_dir }}'
|
||||
- option: 'runtime_branch'
|
||||
value: '{{ ansible_local.local_facts.iiab_branch }}'
|
||||
- option: 'runtime_commit'
|
||||
value: '{{ ansible_local.local_facts.iiab_commit }}'
|
||||
- option: 'runtime_date'
|
||||
value: '{{ ansible_date_time.iso8601 }}'
|
||||
- option: 'ansible_version'
|
||||
value: '{{ ansible_local.local_facts.ansible_version }}'
|
||||
- option: 'kernel'
|
||||
value: '{{ ansible_kernel }}'
|
||||
- option: 'memory_mb'
|
||||
value: '{{ ansible_memtotal_mb }}'
|
||||
- option: 'swap_mb'
|
||||
value: '{{ ansible_swaptotal_mb }}'
|
||||
- option: 'product_id'
|
||||
value: '{{ ansible_product_uuid }}'
|
||||
- option: 'gw_active'
|
||||
value: '{{ gw_active }}'
|
||||
- option: 'internet_available'
|
||||
value: '{{ internet_available }}'
|
||||
|
|
Loading…
Reference in a new issue