browbeat/ansible/install/roles/osp_version/tasks/main.yml
akrzos c8e44e1afc Pike Adjustment playbooks and collectd config modifications.
* Include version changes for various adjustment playbooks

Change-Id: Ie797e080cecfa4caa9b261984e43efa0c02df23e
2017-11-29 15:43:58 -05:00

26 lines
563 B
YAML

---
#
# Slurp OSP version file
#
- name: Check if /etc/rhosp-release exists
stat:
path: /etc/rhosp-release
register: rhosp_release_stat
- name: Get OSP Version
become: true
slurp:
src: "/etc/rhosp-release"
register: osp_version
when: rhosp_release_stat.stat.exists
- debug: msg="WARNING /etc/rhosp-release not found, defaulting version of OSP to Pike"
when: not rhosp_release_stat.stat.exists
- name: Set OSP Version Default
set_fact:
osp_version:
content: "{{'Pike' | b64encode}}"
when: not rhosp_release_stat.stat.exists