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
This commit is contained in:
James E. Blair 2019-02-12 14:20:02 -08:00
parent a79e6dd6bc
commit 1f1f358c03
2 changed files with 11 additions and 10 deletions

View File

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

View File

@ -89,15 +89,15 @@ send_timer k8s
# These playbooks run on the gitea k8s cluster
start_timer
timeout -k 2m 120m ansible-playbook -f 50 -e /etc/ansible/hosts/gitea-cluster.yaml ${SYSTEM_CONFIG}/kubernetes/rook/rook-playbook.yaml
timeout -k 2m 120m ansible-playbook -f 50 -e @/etc/ansible/hosts/gitea-cluster.yaml ${SYSTEM_CONFIG}/kubernetes/rook/rook-playbook.yaml
send_timer gitea_rook
start_timer
timeout -k 2m 120m ansible-playbook -f 50 -e /etc/ansible/hosts/gitea-cluster.yaml ${SYSTEM_CONFIG}/kubernetes/percona-xtradb-cluster/pxc-playbook.yaml
timeout -k 2m 120m ansible-playbook -f 50 -e @/etc/ansible/hosts/gitea-cluster.yaml ${SYSTEM_CONFIG}/kubernetes/percona-xtradb-cluster/pxc-playbook.yaml
send_timer gitea_pxc
start_timer
timeout -k 2m 120m ansible-playbook -f 50 -e /etc/ansible/hosts/gitea-cluster.yaml ${SYSTEM_CONFIG}/kubernetes/gitea/gitea-playbook.yaml
timeout -k 2m 120m ansible-playbook -f 50 -e @/etc/ansible/hosts/gitea-cluster.yaml ${SYSTEM_CONFIG}/kubernetes/gitea/gitea-playbook.yaml
send_timer gitea_gitea
# Update the puppet version