mirror of
https://github.com/kubesphere/kubekey.git
synced 2025-12-25 17:12:50 +00:00
32 lines
907 B
YAML
32 lines
907 B
YAML
---
|
|
- name: Post | Apply Security Enhancements
|
|
hosts:
|
|
- all
|
|
roles:
|
|
- role: security
|
|
when: .security_enhancement
|
|
|
|
- name: Post | Run Post-Installation Scripts
|
|
hosts:
|
|
- all
|
|
tasks:
|
|
- name: Post | Copy post-installation scripts to remote hosts
|
|
ignore_errors: true
|
|
copy:
|
|
src: >-
|
|
{{ .scripts_dir }}/post_install_{{ .inventory_hostname }}.sh
|
|
dest: >-
|
|
/etc/kubekey/scripts/post_install_{{ .inventory_hostname }}.sh
|
|
mode: 0755
|
|
register: post_install_copy_result
|
|
|
|
- name: Post | Execute post-installation scripts on remote hosts
|
|
when: .post_install_copy_result.error | empty
|
|
command: |
|
|
for file in /etc/kubekey/scripts/post_install_*.sh; do
|
|
if [ -f "$file" ]; then
|
|
# Make the script executable and run it
|
|
chmod +x "$file"
|
|
"$file"
|
|
fi
|
|
done |