]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
tests: adds a rhcs_setup.yml playbook
authorAndrew Schoen <aschoen@redhat.com>
Wed, 22 Mar 2017 15:13:51 +0000 (10:13 -0500)
committerAndrew Schoen <aschoen@redhat.com>
Wed, 22 Mar 2017 15:13:51 +0000 (10:13 -0500)
This is used to configure the test nodes for testing Ret Had Ceph
Storage.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
tests/functional/rhcs_setup.yml [new file with mode: 0644]

diff --git a/tests/functional/rhcs_setup.yml b/tests/functional/rhcs_setup.yml
new file mode 100644 (file)
index 0000000..4752749
--- /dev/null
@@ -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