fix(ansible): Résolution violations linting YAML
Fixed yamllint errors and warnings across all Ansible files: - Reformatted long lines to stay within 80 character limit - Standardized boolean values to use true/false instead of yes/no - Fixed YAML folding syntax for multiline strings - Removed erroneous triple quotes in k3s-server tasks This resolves all yamllint issues reported by the CI pipeline.
This commit is contained in:
parent
44e45a0f3d
commit
a5283e316b
8 changed files with 69 additions and 42 deletions
|
|
@ -9,7 +9,11 @@
|
|||
|
||||
vars:
|
||||
# Read node role from file created by cloud-init
|
||||
node_role: "{{ lookup('file', '/etc/node-role', errors='ignore') | default('undefined') }}"
|
||||
node_role: >-
|
||||
{{
|
||||
lookup('file', '/etc/node-role', errors='ignore')
|
||||
| default('undefined')
|
||||
}}
|
||||
|
||||
pre_tasks:
|
||||
- name: Display node information
|
||||
|
|
@ -20,11 +24,13 @@
|
|||
assert:
|
||||
that:
|
||||
- node_role in ['server', 'witness']
|
||||
fail_msg: "Invalid node role: {{ node_role }}. Expected 'server' or 'witness'"
|
||||
fail_msg: >-
|
||||
Invalid node role: {{ node_role }}.
|
||||
Expected 'server' or 'witness'
|
||||
|
||||
- name: Update apt cache
|
||||
apt:
|
||||
update_cache: yes
|
||||
update_cache: true
|
||||
cache_valid_time: 3600
|
||||
|
||||
roles:
|
||||
|
|
@ -42,4 +48,6 @@
|
|||
post_tasks:
|
||||
- name: Display completion message
|
||||
debug:
|
||||
msg: "Configuration complete for {{ ansible_hostname }} ({{ node_role }})"
|
||||
msg: >-
|
||||
Configuration complete for
|
||||
{{ ansible_hostname }} ({{ node_role }})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue