1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00
* move local_facts, test for it, cp if necess

* got os wrong -- not OS

* change /etc/*release, vars/filenames

* add os_ver

* add os_ver to iiab.env

* remove uuid generation for local_facts

* next

* delete debugging lines

* fetch the uuid, and put it in ini file

* be more specific about uuid

* need braces in set_fact

* hyphen in OS-version

* go back to OS.yml based upon os_ver

* remove debug

* oops VERSION_ID->OS_VER

* issure error message when OS not in case statement
This commit is contained in:
georgejhunt 2017-07-04 13:07:47 -07:00 committed by GitHub
parent 0f9d25ab7c
commit dfe68e63fa
16 changed files with 66 additions and 36 deletions

View file

@ -30,5 +30,7 @@
value: '{{ ansible_local["local_facts"]["iiab_commit"] }}'
- option: 'install_date'
value: '{{ ansible_date_time["iso8601"] }}'
- option: 'Universal Unique ID (uuid)'
value: '{{ uuid }}'
- option: 'install_xo'
value: '{{ xo_model }}'

View file

@ -3,11 +3,44 @@
is_F18: True
when: ansible_distribution_release == "based on Fedora 18" or ansible_distribution_version == "18"
- name: abort if the OS is not supported
debug: msg="{{ ansible_local.local_facts.os }} Operating System is not supported"
when: ansible_local.local_facts.os_ver == "OS_not_supported"
# there may be a stop execution, but I did not find it
- pause:
when: ansible_local.local_facts.os_ver == "OS_not_supported"
- name: get the uuidgen program
package: name=uuid-runtime
state=present
when: is_debuntu
- name: Test for UUID file
stat: path=/etc/iiab/uuid
register: uuid_file
- name: Create folder to hold uuid
file: path=/etc/iiab state=directory
when: not uuid_file.stat.exists
- name: If no uuid exists, create one
shell: uuidgen
register: uuid_response
when: not uuid_file.stat.exists
- name: Put the uuid in place
shell: echo {{ uuid_response.stdout_lines[0] }} > /etc/iiab/uuid
when: not uuid_file.stat.exists
- name: get the uuid
command: cat /etc/iiab/uuid
register: stored_uuid
- name: get the value into a variable
set_fact:
uuid={{ stored_uuid.stdout_lines[0] }}
# for rpi, without rtc, we need time as soon as possible
- name: Install chrony package
package: name={{ item }}