summaryrefslogtreecommitdiffstats
path: root/playbooks
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2018-03-18 22:59:31 +0100
committerSuren A. Chilingaryan <csa@suren.me>2018-03-18 22:59:31 +0100
commit47f350bc3aa85a8bd406d95faf084df2abf74ae9 (patch)
tree72ad1e91bac46d3457f89781dc90f0d6c1c074d5 /playbooks
parent006f333828db373435daa15483d2ab753048f62a (diff)
downloadands-47f350bc3aa85a8bd406d95faf084df2abf74ae9.tar.gz
ands-47f350bc3aa85a8bd406d95faf084df2abf74ae9.tar.bz2
ands-47f350bc3aa85a8bd406d95faf084df2abf74ae9.tar.xz
ands-47f350bc3aa85a8bd406d95faf084df2abf74ae9.zip
Second revision: includes hostpath mounts, gluster block storage, kaas apps, etc.
Diffstat (limited to 'playbooks')
-rw-r--r--playbooks/ands-network.yml2
-rw-r--r--playbooks/maintain.yml11
-rw-r--r--playbooks/openshift-health.yml19
-rw-r--r--playbooks/openshift-setup-apps.yml14
-rw-r--r--playbooks/openshift-setup-project.yml11
-rw-r--r--playbooks/openshift-setup-projects.yml14
6 files changed, 58 insertions, 13 deletions
diff --git a/playbooks/ands-network.yml b/playbooks/ands-network.yml
index 1788781..211ddfe 100644
--- a/playbooks/ands-network.yml
+++ b/playbooks/ands-network.yml
@@ -14,6 +14,6 @@
- role: ofed
- name: Network configuration
- hosts: ands
+ hosts: baremetal
roles:
- { role: ands_network, action: nm_configure }
diff --git a/playbooks/maintain.yml b/playbooks/maintain.yml
index 03d6d9a..80061ec 100644
--- a/playbooks/maintain.yml
+++ b/playbooks/maintain.yml
@@ -4,14 +4,3 @@
- role: ands_facts
- { role: ands_network, action: maintain }
-- name: Check cert expirys
- hosts: nodes:masters:etcd
- become: yes
- gather_facts: no
- vars:
- openshift_certificate_expiry_save_json_results: no
- openshift_certificate_expiry_generate_html_report: yes
- openshift_certificate_expiry_html_report_path: reports/certs.html
- openshift_certificate_expiry_show_all: yes
- roles:
- - role: openshift_certificate_expiry
diff --git a/playbooks/openshift-health.yml b/playbooks/openshift-health.yml
new file mode 100644
index 0000000..e645d02
--- /dev/null
+++ b/playbooks/openshift-health.yml
@@ -0,0 +1,19 @@
+- name: Configure cluster hosts names
+ hosts: nodes:new_nodes
+ roles:
+ - { role: ands_facts }
+
+
+- import_playbook: ../anslib/openshift-ansible/playbooks/openshift-checks/health.yml
+
+- name: Check cert expirys
+ hosts: nodes:masters:etcd
+ become: yes
+ gather_facts: no
+ vars:
+ openshift_certificate_expiry_save_json_results: no
+ openshift_certificate_expiry_generate_html_report: yes
+ openshift_certificate_expiry_html_report_path: reports/certs.html
+ openshift_certificate_expiry_show_all: yes
+ roles:
+ - role: openshift_certificate_expiry
diff --git a/playbooks/openshift-setup-apps.yml b/playbooks/openshift-setup-apps.yml
new file mode 100644
index 0000000..0719f5d
--- /dev/null
+++ b/playbooks/openshift-setup-apps.yml
@@ -0,0 +1,14 @@
+- name: Analyze Ands configuration
+ hosts: nodes
+ roles:
+ - { role: ands_facts }
+
+- name: "Configure apps for {{ kaas_single_project }}"
+ hosts: masters
+ roles:
+ - { role: ands_kaas, subrole: apps }
+ vars:
+ kaas_openshift_volumes: "{{ ands_openshift_volumes }}"
+ kaas_projects: "{{ ands_openshift_projects.keys() }}"
+ kaas_single_project: "{{ ands_configure_project }}"
+ kaas_single_app: "{{ ands_configure_app | default(ands_none) }}"
diff --git a/playbooks/openshift-setup-project.yml b/playbooks/openshift-setup-project.yml
index a4666e3..f7d80e9 100644
--- a/playbooks/openshift-setup-project.yml
+++ b/playbooks/openshift-setup-project.yml
@@ -3,6 +3,16 @@
roles:
- { role: ands_facts }
+- name: Configure per-node {{ kaas_single_project }} project storage
+ hosts: ands_storage_servers
+ roles:
+ - { role: ands_kaas, subrole: storage }
+ vars:
+ kaas_projects: "{{ ands_openshift_projects.keys() }}"
+ kaas_openshift_volumes: "{{ ands_openshift_volumes }}"
+ kaas_single_project: "{{ ands_configure_project }}"
+
+
- name: "Configure project {{ kaas_single_project }}"
hosts: masters
roles:
@@ -11,3 +21,4 @@
kaas_openshift_volumes: "{{ ands_openshift_volumes }}"
kaas_projects: "{{ ands_openshift_projects.keys() }}"
kaas_single_project: "{{ ands_configure_project }}"
+
diff --git a/playbooks/openshift-setup-projects.yml b/playbooks/openshift-setup-projects.yml
index 164f91c..00aabfd 100644
--- a/playbooks/openshift-setup-projects.yml
+++ b/playbooks/openshift-setup-projects.yml
@@ -9,8 +9,20 @@
- { role: ands_openshift, subrole: users }
- { role: ands_openshift, subrole: security }
- { role: ands_openshift, subrole: storage }
- - { role: ands_kaas }
+
+- name: Configure per-node project storage
+ hosts: ands_storage_servers
+ roles:
+ - { role: ands_kaas, subrole: storage }
vars:
kaas_projects: "{{ ands_openshift_projects.keys() }}"
kaas_openshift_volumes: "{{ ands_openshift_volumes }}"
+
+- name: Configure users & user projects
+ hosts: masters
+ roles:
+ - { role: ands_kaas }
+ vars:
+ kaas_projects: "{{ ands_openshift_projects.keys() }}"
+ kaas_openshift_volumes: "{{ ands_openshift_volumes }}"