mirror of
https://github.com/PyratLabs/ansible-role-k3s
synced 2024-12-11 21:40:18 +01:00
feat(post-checks): add option to skip post-checks
This commit is contained in:
parent
25a17b8511
commit
21fe3bccbf
5 changed files with 19 additions and 8 deletions
11
README.md
11
README.md
|
@ -188,11 +188,12 @@ configuration.
|
|||
The below variables are used to change the way the role executes in Ansible,
|
||||
particularly with regards to privilege escalation.
|
||||
|
||||
| Variable | Description | Default Value |
|
||||
|-----------------------|----------------------------------------------------------------|---------------|
|
||||
| `k3s_skip_validation` | Skip all tasks that validate configuration. | `false` |
|
||||
| `k3s_skip_env_checks` | Skip all tasks that check environment configuration. | `false` |
|
||||
| `k3s_become` | Escalate user privileges for tasks that need root permissions. | `false` |
|
||||
| Variable | Description | Default Value |
|
||||
|------------------------|----------------------------------------------------------------|---------------|
|
||||
| `k3s_skip_validation` | Skip all tasks that validate configuration. | `false` |
|
||||
| `k3s_skip_env_checks` | Skip all tasks that check environment configuration. | `false` |
|
||||
| `k3s_skip_post_checks` | Skip all tasks that check post execution state. | `false` |
|
||||
| `k3s_become` | Escalate user privileges for tasks that need root permissions. | `false` |
|
||||
|
||||
#### Important note about Python
|
||||
|
||||
|
|
|
@ -38,6 +38,9 @@ k3s_skip_validation: false
|
|||
# Skip all tasks that check environment configuration
|
||||
k3s_skip_env_checks: false
|
||||
|
||||
# Skip post-checks
|
||||
k3s_skip_post_checks: false
|
||||
|
||||
# Installation directory for k3s
|
||||
k3s_install_dir: /usr/local/bin
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
node-ip: "{{ ansible_default_ipv4.address }}"
|
||||
snapshotter: native
|
||||
k3s_skip_validation: "{{ k3s_service_handler[ansible_service_mgr] == 'service' }}"
|
||||
k3s_skip_post_checks: "{{ ansible_os_family | lower == 'redhat' }}"
|
||||
pre_tasks:
|
||||
- name: Set each node to be a control node
|
||||
ansible.builtin.set_fact:
|
||||
|
|
|
@ -93,10 +93,14 @@
|
|||
- not k3s_primary_control_node
|
||||
|
||||
- import_tasks: post_checks_control_plane.yml
|
||||
when: not k3s_skip_validation
|
||||
when:
|
||||
- not k3s_skip_validation
|
||||
- not k3s_skip_post_checks
|
||||
|
||||
- name: Flush Handlers
|
||||
ansible.builtin.meta: flush_handlers
|
||||
|
||||
- import_tasks: post_checks_nodes.yml
|
||||
when: not k3s_skip_validation
|
||||
when:
|
||||
- not k3s_skip_validation
|
||||
- not k3s_skip_post_checks
|
||||
|
|
|
@ -7,4 +7,6 @@
|
|||
- import_tasks: ensure_uninstalled.yml
|
||||
|
||||
- import_tasks: post_checks_uninstalled.yml
|
||||
when: not k3s_skip_validation
|
||||
when:
|
||||
- not k3s_skip_validation
|
||||
- not k3s_skip_post_checks
|
||||
|
|
Loading…
Reference in a new issue