chore: update ansible assertion formatting

Signed-off-by: Devin Buhl <devin@buhl.casa>
This commit is contained in:
Devin Buhl committed 2023-07-17 17:30:37 -04:00
1 parent cf34c795b6
commit e447d28df7
5 files changed
+57 -63

No files matched your search

+6 -8
View File
@@ -2,10 +2,9 @@
- name: Verify required bootstrap vars are set
ansible.builtin.assert:
that:
- "{{ item }} | default('', true) | trim != ''"
success_msg: "Required bootstrap var {{ item }} exists and is defined"
fail_msg: "Required bootstrap var {{ item }} does not exists or is not defined"
that: item | default('', true) | trim != ''
success_msg: Required bootstrap var {{ item }} exists and is defined
fail_msg: Required bootstrap var {{ item }} does not exists or is not defined
loop:
- bootstrap_github_username
- bootstrap_github_repository_name
@@ -27,10 +26,9 @@
- name: Verify bootstrap node names are valid
ansible.builtin.assert:
that:
- "item.name is match('^[a-z0-9-]+$')"
success_msg: "Node name {{ item.name }} is valid"
fail_msg: "Node name {{ item.name }} is not valid"
that: item.name is match('^[a-z0-9-]+$')
success_msg: Node name {{ item.name }} is valid
fail_msg: Node name {{ item.name }} is not valid
loop: "{{ bootstrap_nodes.master + bootstrap_nodes.worker | default([]) }}"
loop_control:
label: "{{ item.name }}"