Browse Source

Fix gitea playbooks

First, we need an @ before the extra vars files.  Why?  Because
an @ is needed.

Second, the rook playbook was stringing all 4 commands on to one
exec call which was working poorly.  Instead, make 4 tasks so that
it's slightly better represented in ansible output, each of which
has a (presumably) valid command.

Change-Id: I30efe84d2041237a00da0c0aac02afa92d29c0fb
James E. Blair 2 months ago
parent
commit
1f1f358c03
2 changed files with 11 additions and 10 deletions
  1. 8
    7
      kubernetes/rook/rook-playbook.yaml
  2. 3
    3
      run_all.sh

+ 8
- 7
kubernetes/rook/rook-playbook.yaml View File

@@ -1,14 +1,15 @@
1 1
 - hosts: localhost
2 2
   tasks:
3
-
4 3
     # Using kubectl rather than k8s module because the
5 4
     # k8s module only allows single document files and
6 5
     # the majority of these files are pretty straight
7 6
     # copies from upstream rook, so reorganizing them
8 7
     # into single document files is lame.
9
-    - name: Set up cinder storage class
10
-      command: |
11
-        kubectl --context gitea apply -f rook-operator.yaml
12
-        kubectl --context gitea apply -f rook-cluster.yaml
13
-        kubectl --context gitea apply -f rook-toolbox.yaml
14
-        kubectl --context gitea apply -f rook-filesystem.yaml
8
+    - name: Set up Rook operator
9
+      command: kubectl --context gitea apply -f rook-operator.yaml
10
+    - name: Set up Rook cluster
11
+      command: kubectl --context gitea apply -f rook-cluster.yaml
12
+    - name: Set up Rook toolbox
13
+      command: kubectl --context gitea apply -f rook-toolbox.yaml
14
+    - name: Set up Rook filesystem
15
+      command: kubectl --context gitea apply -f rook-filesystem.yaml

+ 3
- 3
run_all.sh View File

@@ -89,15 +89,15 @@ send_timer k8s
89 89
 
90 90
 # These playbooks run on the gitea k8s cluster
91 91
 start_timer
92
-timeout -k 2m 120m ansible-playbook -f 50 -e /etc/ansible/hosts/gitea-cluster.yaml ${SYSTEM_CONFIG}/kubernetes/rook/rook-playbook.yaml
92
+timeout -k 2m 120m ansible-playbook -f 50 -e @/etc/ansible/hosts/gitea-cluster.yaml ${SYSTEM_CONFIG}/kubernetes/rook/rook-playbook.yaml
93 93
 send_timer gitea_rook
94 94
 
95 95
 start_timer
96
-timeout -k 2m 120m ansible-playbook -f 50 -e /etc/ansible/hosts/gitea-cluster.yaml ${SYSTEM_CONFIG}/kubernetes/percona-xtradb-cluster/pxc-playbook.yaml
96
+timeout -k 2m 120m ansible-playbook -f 50 -e @/etc/ansible/hosts/gitea-cluster.yaml ${SYSTEM_CONFIG}/kubernetes/percona-xtradb-cluster/pxc-playbook.yaml
97 97
 send_timer gitea_pxc
98 98
 
99 99
 start_timer
100
-timeout -k 2m 120m ansible-playbook -f 50 -e /etc/ansible/hosts/gitea-cluster.yaml ${SYSTEM_CONFIG}/kubernetes/gitea/gitea-playbook.yaml
100
+timeout -k 2m 120m ansible-playbook -f 50 -e @/etc/ansible/hosts/gitea-cluster.yaml ${SYSTEM_CONFIG}/kubernetes/gitea/gitea-playbook.yaml
101 101
 send_timer gitea_gitea
102 102
 
103 103
 # Update the puppet version

Loading…
Cancel
Save