Skip to content

Commit

Permalink
bin: added options to all playbooks in apply
Browse files Browse the repository at this point in the history
  • Loading branch information
Elias-elastisys authored and anders-elastisys committed Dec 12, 2024
1 parent a013541 commit 5eb72ff
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions bin/apply.bash
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ shopt -s globstar nullglob dotglob
here="$(dirname "$(readlink -f "$0")")"
# shellcheck source=bin/common.bash
source "${here}/common.bash"

if [[ "$#" -gt 0 ]]; then
log_warning "Warning: Additional flags have been provided to use for running playbooks"
log_warning "This might not work if the first control-plane node is not provided"
fi

ck8s_kubespray_version_check
kubespray_version_check
check_openstack_credentials
Expand All @@ -31,14 +37,14 @@ ansible-playbook -i "${config[inventory_file]}" cluster.yml -b "${@}"
log_info "Kubespray done"

log_info "Get kubeconfig"
ansible-playbook -i "${config[inventory_file]}" ../playbooks/kubeconfig.yml -b
ansible-playbook -i "${config[inventory_file]}" ../playbooks/kubeconfig.yml -b "${@}"
log_info "Adding cluster-admin ClusterRoleBinding"
ansible-playbook -i "${config[inventory_file]}" ../playbooks/cluster_admin_rbac.yml -b
ansible-playbook -i "${config[inventory_file]}" ../playbooks/cluster_admin_rbac.yml -b "${@}"

log_info "Master cis benchmark patching"
ansible-playbook -i "${config[inventory_file]}" ../playbooks/master_cis_benchmark_patch.yml -b
ansible-playbook -i "${config[inventory_file]}" ../playbooks/master_cis_benchmark_patch.yml -b "${@}"
log_info "Worker cis benchmark patching"
ansible-playbook -i "${config[inventory_file]}" ../playbooks/worker_cis_benchmark_patch.yml -b
ansible-playbook -i "${config[inventory_file]}" ../playbooks/worker_cis_benchmark_patch.yml -b "${@}"

popd

Expand Down

0 comments on commit 5eb72ff

Please sign in to comment.