Skip to content

Commit 81b840c

Browse files
committed
Update examples
The only non-linter error is ansible.builtin.assert fail_msg vs. fail_message, in examples/version_update_single_node.yml. Signed-off-by: Justin Cinkelj <justin.cinkelj@xlab.si>
1 parent c9a63de commit 81b840c

20 files changed

+48
-33
lines changed

examples/api_get_cluster_info.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@
1313
register: cluster_result
1414

1515
- name: Show cluster info - complete API response
16-
debug:
16+
ansible.builtin.debug:
1717
var: cluster_result.record
1818

1919
- name: Show cluster version
20-
debug:
20+
ansible.builtin.debug:
2121
msg:
2222
- Cluster name is '{{ cluster_result.record[0].clusterName }}'
2323
- Cluster SW version is '{{ cluster_result.record[0].icosVersion }}'

examples/certificate_signing_example.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
tasks:
1010
# More info about openssl_privatekey module
1111
# (https://docs.ansible.com/ansible/latest/collections/community/crypto/openssl_privatekey_module.html)
12-
- name: generate private key with openSSL
12+
- name: Generate private key with openSSL
1313
community.crypto.openssl_privatekey:
1414
path: private_key_example.pem
1515

@@ -36,7 +36,7 @@
3636
privatekey_path: private_key_example.pem
3737
provider: selfsigned
3838

39-
- name: upload generated certificate and private_key with certificate module
39+
- name: Upload generated certificate and private_key with certificate module
4040
scale_computing.hypercore.certificate:
4141
cluster_instance:
4242
private_key: "{{ lookup('file', 'private_key_example.pem') }}"
@@ -46,5 +46,5 @@
4646
check_mode: "{{ hypercore_example_check_mode }}"
4747

4848
- name: Show uploaded certificate info
49-
debug:
49+
ansible.builtin.debug:
5050
var: certificate_info

examples/cluster_config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
var: cluster_configuration
4848

4949
- name: Configure HyperCore cluster
50-
include_role:
50+
ansible.builtin.include_role:
5151
name: scale_computing.hypercore.cluster_config
5252
vars:
5353
scale_computing_hypercore_cluster_config: "{{ cluster_configuration }}"

examples/dns_config_info.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@
1111
register: dns_config_info_results
1212

1313
- name: Show all DNS config entries
14-
debug:
14+
ansible.builtin.debug:
1515
var: dns_config_info_results

examples/email_alert_info.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,7 @@
88
- name: List all Email alert recipients
99
scale_computing.hypercore.email_alert_info:
1010
register: info
11-
- ansible.builtin.debug:
11+
12+
- name: Show configured email alert recipients
13+
ansible.builtin.debug:
1214
msg: "{{ info }}"

examples/iso.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
ansible.builtin.get_url:
1515
url: "{{ iso_url }}"
1616
dest: /tmp/{{ iso_filename }}
17+
mode: 0644
1718

1819
- name: (Optionally) remove existing ISO {{ iso_filename }} from HyperCore
1920
scale_computing.hypercore.iso:
@@ -36,5 +37,5 @@
3637
register: iso_results
3738

3839
- name: Show info about {{ iso_filename }} ISO
39-
debug:
40+
ansible.builtin.debug:
4041
var: iso_results.records[0]

examples/iso_info.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
register: iso_results
1717

1818
- name: Show all ISOs
19-
debug:
19+
ansible.builtin.debug:
2020
var: iso_results
2121

2222
# ------------------------------------------------------
@@ -26,7 +26,7 @@
2626
register: iso_results
2727

2828
- name: Show info about single ISO
29-
debug:
29+
ansible.builtin.debug:
3030
var: iso_results
3131

3232
# ------------------------------------------------------
@@ -37,5 +37,5 @@
3737
register: iso_results
3838

3939
- name: Show info about not present ISO
40-
debug:
40+
ansible.builtin.debug:
4141
var: iso_results

examples/list_vms_with_ide_disk.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@
5454
- name: Fail if any VM uses IDE disk
5555
ansible.builtin.fail:
5656
msg: Found {{ ide_vm_names | length }} VMs using IDE disk
57-
when: ide_vm_names | length > 0
58-
# VMs with IDE disks are created while testing. Ignore them if testing.
59-
ignore_errors: "{{ hypercore_example_check_mode | default(false) }}"
57+
when:
58+
- ide_vm_names | length >= 0
59+
# VMs with IDE disks are created while testing. Ignore them if CI testing the example -
60+
# hypercore_example_check_mode will be True.
61+
- not (hypercore_example_check_mode | default(false))

examples/oidc_config_setup_azure_ad.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
register: oidc_config_info_results
2121

2222
- name: Show oidc config entries
23-
debug:
23+
ansible.builtin.debug:
2424
var: oidc_config_info_results
2525

2626
- name: Create or update OIDC config
@@ -35,5 +35,5 @@
3535
register: oidc_config_info_results
3636

3737
- name: Show updated oidc config entries
38-
debug:
38+
ansible.builtin.debug:
3939
var: oidc_config_info_results

examples/smtp.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,6 @@
3636
scale_computing.hypercore.smtp_info:
3737
register: smtp_info
3838

39-
- ansible.builtin.debug:
39+
- name: Show SMTP configuration
40+
ansible.builtin.debug:
4041
msg: Final SMTP configuration is "{{ smtp_info }}"

0 commit comments

Comments
 (0)