Skip to content

Commit 74c5de5

Browse files
committed
Update ansible-lint after sync
1 parent 6bc5e8b commit 74c5de5

File tree

2 files changed

+14
-12
lines changed

2 files changed

+14
-12
lines changed

etc/kayobe/ansible/deploy-os-capacity-exporter.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@
2222
register: openrc_file_stat
2323
run_once: true
2424

25-
- block:
25+
- name: If admin-openrc.sh exists, deploy os-capacity exporter
26+
when: stackhpc_enable_os_capacity and openrc_file_stat.stat.exists
27+
block:
2628
- name: Ensure os-capacity directory exists
2729
ansible.builtin.file:
2830
path: /opt/kayobe/os-capacity/
@@ -37,12 +39,12 @@
3739

3840
- name: Set facts for admin credentials
3941
ansible.builtin.set_fact:
40-
stackhpc_os_capacity_auth_url: "{{ credential.stdout_lines | select('match', '.*OS_AUTH_URL*.') | first | split('=') | last | replace(\"'\",'') }}"
41-
stackhpc_os_capacity_project_name: "{{ credential.stdout_lines | select('match', '.*OS_PROJECT_NAME*.') | first | split('=') | last | replace(\"'\",'') }}"
42-
stackhpc_os_capacity_domain_name: "{{ credential.stdout_lines | select('match', '.*OS_PROJECT_DOMAIN_NAME*.') | first | split('=') | last | replace(\"'\",'') }}"
43-
stackhpc_os_capacity_openstack_region_name: "{{ credential.stdout_lines | select('match', '.*OS_REGION_NAME*.') | first | split('=') | last | replace(\"'\",'') }}"
44-
stackhpc_os_capacity_username: "{{ credential.stdout_lines | select('match', '.*OS_USERNAME*.') | first | split('=') | last | replace(\"'\",'') }}"
45-
stackhpc_os_capacity_password: "{{ credential.stdout_lines | select('match', '.*OS_PASSWORD*.') | first | split('=') | last | replace(\"'\",'') }}"
42+
stackhpc_os_capacity_auth_url: "{{ credential.stdout_lines | select('match', '.*OS_AUTH_URL*.') | first | split('=') | last | replace(\"'\", '') }}"
43+
stackhpc_os_capacity_project_name: "{{ credential.stdout_lines | select('match', '.*OS_PROJECT_NAME*.') | first | split('=') | last | replace(\"'\", '') }}"
44+
stackhpc_os_capacity_domain_name: "{{ credential.stdout_lines | select('match', '.*OS_PROJECT_DOMAIN_NAME*.') | first | split('=') | last | replace(\"'\", '') }}"
45+
stackhpc_os_capacity_openstack_region_name: "{{ credential.stdout_lines | select('match', '.*OS_REGION_NAME*.') | first | split('=') | last | replace(\"'\", '') }}"
46+
stackhpc_os_capacity_username: "{{ credential.stdout_lines | select('match', '.*OS_USERNAME*.') | first | split('=') | last | replace(\"'\", '') }}"
47+
stackhpc_os_capacity_password: "{{ credential.stdout_lines | select('match', '.*OS_PASSWORD*.') | first | split('=') | last | replace(\"'\", '') }}"
4648

4749
- name: Template clouds.yml
4850
ansible.builtin.template:
@@ -72,4 +74,3 @@
7274
restart: "{{ clouds_yaml_result is changed or cacert_result is changed }}"
7375
restart_policy: unless-stopped
7476
become: true
75-
when: stackhpc_enable_os_capacity and openrc_file_stat.stat.exists

etc/kayobe/ansible/fix-grub-rl9.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@
44
become: true
55
gather_facts: true
66
tasks:
7-
- block:
7+
- name: Remove "--root-dev-only" from grub.cfg if OS is Rocky Linux 9
8+
when:
9+
- ansible_facts['distribution'] == 'Rocky'
10+
- ansible_facts['distribution_major_version'] == '9'
11+
block:
812
- name: Check that /boot/efi/EFI/rocky/grub.cfg exists
913
ansible.builtin.stat:
1014
path: /boot/efi/EFI/rocky/grub.cfg
@@ -16,6 +20,3 @@
1620
regexp: --root-dev-only\s?
1721
replace: ""
1822
when: stat_result.stat.exists
19-
when:
20-
- ansible_facts['distribution'] == 'Rocky'
21-
- ansible_facts['distribution_major_version'] == '9'

0 commit comments

Comments
 (0)