tests: adds a rhcs_setup.yml playbook

This is used to configure the test nodes for testing Ret Had Ceph
Storage.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
pull/1389/head
Andrew Schoen 2017-03-22 10:13:51 -05:00
parent 1fce790128
commit d261da6679
1 changed files with 70 additions and 0 deletions

View File

@ -0,0 +1,70 @@
---
- hosts: local
gather_facts: false
become: yes
tags:
- vagrant_setup
tasks:
- name: change centos/7 vagrant box name to rhel7
replace:
regexp: "centos/7"
replace: "rhel7"
path: "{{ change_dir }}/vagrant_variables.yml"
when: change_dir is defined
- hosts: all
gather_facts: true
become: yes
tasks:
- name: check if it is Atomic host
stat: path=/run/ostree-booted
register: stat_ostree
always_run: true
- name: set fact for using Atomic host
set_fact:
is_atomic: '{{ stat_ostree.stat.exists }}'
- hosts: mons
gather_facts: false
become: yes
tasks:
- name: install ceph mon repo
yum_repository:
name: ceph-mon
description: repo for rhcs ceph-mon
baseurl: "{{ repo_url }}/MON/x86_64/os/"
gpgcheck: no
when:
- not is_atomic
- hosts: osds
gather_facts: false
become: yes
tasks:
- name: install ceph osd repo
yum_repository:
name: ceph-osd
description: repo for rhcs ceph-osd
baseurl: "{{ repo_url }}/OSD/x86_64/os/"
gpgcheck: no
when:
- not is_atomic
- hosts: mdss:rgws:clients
gather_facts: false
become: yes
tasks:
- name: install ceph tools repo
yum_repository:
name: ceph-osd
description: repo for rhcs ceph tools
baseurl: "{{ repo_url }}/TOOLS/x86_64/os/"
gpgcheck: no
when:
- not is_atomic