summaryrefslogtreecommitdiffstats
path: root/ansible
diff options
context:
space:
mode:
authorYaniv Kaul <ykaul@redhat.com>2018-09-19 23:35:55 +0300
committerYaniv Kaul <ykaul@redhat.com>2018-10-10 13:26:28 +0000
commitc160ad53942670dc1e91abe068bb94777f1a8a9a (patch)
tree542eabb83b48bf46f07154658f7cbc51555b758c /ansible
parent66554d500fb0ebf750cad863487c31eaf145376f (diff)
deploy/deploy-glusto.yaml: An Ansible script to deploy Glusto & friends
Running ansible-lint provides few warnings. I think all can be ignored for the time being: [ykaul@ykaul ansible]$ ansible-lint deploy-glusto.yaml [ANSIBLE0006] yum used in place of yum module deploy-glusto.yaml:39 Task/Handler: enable copr repo [ANSIBLE0012] Commands should not change things if nothing needs doing deploy-glusto.yaml:39 Task/Handler: enable copr repo [ANSIBLE0013] Use shell only when shell functionality is required deploy-glusto.yaml:39 Task/Handler: enable copr repo [ANSIBLE0010] Package installs should not use latest deploy-glusto.yaml:42 Task/Handler: install gdeploy [ANSIBLE0004] Git checkouts must contain explicit version deploy-glusto.yaml:47 Task/Handler: clone glusto, glusto-tests [ANSIBLE0012] Commands should not change things if nothing needs doing deploy-glusto.yaml:56 Task/Handler: setup glusto-test [ANSIBLE0013] Use shell only when shell functionality is required deploy-glusto.yaml:56 Task/Handler: setup glusto-test Change-Id: I2ff56c1b7e2752f0b2c7ea6ee449f4635862db37
Diffstat (limited to 'ansible')
-rw-r--r--ansible/deploy-glusto.yaml65
1 files changed, 65 insertions, 0 deletions
diff --git a/ansible/deploy-glusto.yaml b/ansible/deploy-glusto.yaml
new file mode 100644
index 0000000..a5eb5ef
--- /dev/null
+++ b/ansible/deploy-glusto.yaml
@@ -0,0 +1,65 @@
+---
+- hosts: gluster_hosts
+ gather_facts: no
+
+ tasks:
+ - name: Add EPEL repository
+ yum_repository:
+ name: epel
+ description: EPEL YUM repo
+ mirrorlist: https://mirrors.fedoraproject.org/mirrorlist?repo=epel-7&arch=$basearch
+ enabled: no
+ gpgcheck: no
+
+ - name: Install required packages
+ yum:
+ name: "{{ item }}"
+ state: present
+ disablerepo: "epel"
+ with_items:
+ - git
+ - yum-plugin-copr
+
+ - name: Install EPEL required packages
+ yum:
+ name: "{{ item }}"
+ state: present
+ enablerepo: "epel"
+ with_items:
+ - python-pip
+
+ - name: upgrade setuptools
+ pip:
+ name: "{{ item }}"
+ extra_args: --upgrade
+ with_items:
+ - setuptools
+ - six
+
+ - name: enable copr repo
+ shell: yum copr enable sac/gdeploy -y
+
+ - name: install gdeploy
+ yum:
+ name: gdeploy
+ state: latest
+
+ - name: clone glusto, glusto-tests
+ git:
+ repo: "{{ item.repo }}"
+ dest: "{{ item.dest }}"
+ depth: 1
+ with_items:
+ - {repo: "http://review.gluster.org/glusto-tests", dest: "~/glusto-tests" }
+ - {repo: "https://github.com/loadtheaccumulator/glusto.git", dest: "~/glusto" }
+
+ - name: setup glusto-test
+ shell: python setup.py install
+ args:
+ chdir: "{{ item }}"
+ with_items:
+ - ~/glusto
+ - ~/glusto-tests/glustolibs-gluster/
+ - ~/glusto-tests/glustolibs-io/
+ - ~/glusto-tests/glustolibs-misc/
+