Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions playbooks/7_ocp_verification.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@
approve_certs_cleanup: true
- wait_for_cluster_operators
- wait_for_install_complete
- label_infra_nodes

Check failure on line 20 in playbooks/7_ocp_verification.yaml

View workflow job for this annotation

GitHub Actions / Ansible_Lint

yaml[empty-lines]

Too many blank lines (1 > 0)
4 changes: 2 additions & 2 deletions roles/create_control_nodes/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
ansible.builtin.include_vars:
file: "{{ inventory_dir }}/host_vars/{{ inventory_hostname }}.yaml"

- name: Create CoreOS control nodes on the the KVM host.

Check failure on line 8 in roles/create_control_nodes/tasks/main.yaml

View workflow job for this annotation

GitHub Actions / Ansible_Lint

literal-compare

Don't compare to literal True/False.
tags: create_control_nodes
shell: |

Check failure on line 10 in roles/create_control_nodes/tasks/main.yaml

View workflow job for this annotation

GitHub Actions / Ansible_Lint

fqcn[action-core]

Use FQCN for builtin module actions (shell).
virt-install \
--name {{ env.cluster.nodes.control.vm_name[i] }} \
--osinfo detect=on,name={{ ('rhel8.6') if rhcos_os_variant is not defined else (rhcos_os_variant) }} \
Expand All @@ -23,8 +23,8 @@
{% if (env.cluster.nodes.control.mac[i] is defined and env.use_dhcp) %}
--extra-args "ip=dhcp" \
{% else %}
--extra-args "ip={{ env.cluster.nodes.control.ip[i] }}::{{ env.cluster.networking.gateway }}:{{ env.cluster.networking.subnetmask }}:{{ env.cluster.nodes.control.hostname[i] }}.{{ env.cluster.networking.metadata_name }}.{{ env.cluster.networking.base_domain }}:{{ env.cluster.networking.interface }}:none:1500" \

Check failure on line 26 in roles/create_control_nodes/tasks/main.yaml

View workflow job for this annotation

GitHub Actions / Ansible_Lint

yaml[line-length]

Line too long (316 > 160 characters)
--extra-args "{{ ('ip=[' + env.cluster.nodes.control.ipv6[i] + ']::[' + env.cluster.networking.ipv6_gateway +']:' + env.cluster.networking.ipv6_prefix | string + '::' + env.cluster.networking.interface + ':none' ) if env.use_ipv6 == True else '' }}" \

Check failure on line 27 in roles/create_control_nodes/tasks/main.yaml

View workflow job for this annotation

GitHub Actions / Ansible_Lint

yaml[line-length]

Line too long (255 > 160 characters)
{% endif %}
--extra-args "nameserver={{ env.cluster.networking.nameserver1 }}" \
--extra-args "{{ ('nameserver=' + env.cluster.networking.nameserver2) if env.cluster.networking.nameserver2 is defined else '' }}" \
Expand All @@ -38,14 +38,14 @@
timeout: 360
with_sequence: start=0 end={{ (env.cluster.nodes.control.hostname | length) - 1 }} stride=1
loop_control:
extended: yes

Check failure on line 41 in roles/create_control_nodes/tasks/main.yaml

View workflow job for this annotation

GitHub Actions / Ansible_Lint

yaml[truthy]

Truthy value should be one of [false, true]
index_var: i
when: env.z.high_availability == False and inventory_hostname == env.z.lpar1.hostname and env.cluster.nodes.control.vm_name[i] not in hosts_with_host_vars
# {{ ('ip=[' + env.cluster.nodes.control.ipv6[i] + ']::[' + env.cluster.networking.ipv6_gateway +']:' + env.cluster.networking.ipv6_prefix | string + '::' + env.cluster.networking.interface + ':none' ) if env.use_ipv6 == True else '' }} \

Check failure on line 44 in roles/create_control_nodes/tasks/main.yaml

View workflow job for this annotation

GitHub Actions / Ansible_Lint

yaml[line-length]

Line too long (241 > 160 characters)

- name: Create the first CoreOS control node on the first KVM host, if cluster is to be highly available.

Check failure on line 46 in roles/create_control_nodes/tasks/main.yaml

View workflow job for this annotation

GitHub Actions / Ansible_Lint

literal-compare

Don't compare to literal True/False.
tags: create_control_nodes
shell: |

Check failure on line 48 in roles/create_control_nodes/tasks/main.yaml

View workflow job for this annotation

GitHub Actions / Ansible_Lint

fqcn[action-core]

Use FQCN for builtin module actions (shell).
virt-install \
--name {{ env.cluster.nodes.control.vm_name[0] }} \
--osinfo detect=on,name={{ ('rhel8.6') if rhcos_os_variant is not defined else (rhcos_os_variant) }} \
Expand All @@ -61,7 +61,7 @@
{% if (env.cluster.nodes.control.mac[0] is defined and env.use_dhcp) %}
--extra-args "ip=dhcp" \
{% else %}
--extra-args "ip={{ env.cluster.nodes.control.ip[0] }}::{{ env.cluster.networking.gateway }}:{{ env.cluster.networking.subnetmask }}:{{ env.cluster.nodes.control.hostname[0] }}.{{ env.cluster.networking.metadata_name }}.{{ env.cluster.networking.base_domain }}:{{ env.cluster.networking.interface }}:none:1500" \

Check failure on line 64 in roles/create_control_nodes/tasks/main.yaml

View workflow job for this annotation

GitHub Actions / Ansible_Lint

yaml[line-length]

Line too long (316 > 160 characters)
--extra-args "{{ ('ip=[' + env.cluster.nodes.control.ipv6[0] + ']::[' + env.cluster.networking.ipv6_gateway +']:' + env.cluster.networking.ipv6_prefix | string + '::' + env.cluster.networking.interface + ':none' ) if env.use_ipv6 == True else '' }}" \
{% endif %}
--extra-args "nameserver={{ env.cluster.networking.nameserver1 }}" \
Expand All @@ -74,7 +74,7 @@
--noautoconsole
when: env.z.high_availability == True and inventory_hostname == env.z.lpar1.hostname and env.cluster.nodes.control.vm_name[0] not in hosts_with_host_vars

- name: Create the second CoreOS control node on the first KVM host, if cluster is to be highly available.
- name: Create the second CoreOS control node on the second KVM host, if cluster is to be highly available.
tags: create_control_nodes
shell: |
virt-install \
Expand Down Expand Up @@ -105,7 +105,7 @@
--noautoconsole
when: env.z.high_availability == True and inventory_hostname == env.z.lpar2.hostname and env.cluster.nodes.control.vm_name[1] not in hosts_with_host_vars

- name: Create the third CoreOS control node on the first KVM host, if cluster is to be highly available.
- name: Create the third CoreOS control node on the third KVM host, if cluster is to be highly available.
tags: create_control_nodes
shell: |
virt-install \
Expand Down
11 changes: 11 additions & 0 deletions roles/label_infra_nodes/tasks/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---

- name: 'Label infra nodes as infra'
tags: check_nodes
ansible.builtin.shell: |
set -o pipefail
oc label node $(oc get nodes | grep "^{{ node | lower }}" | awk '{print $1}') node-role.kubernetes.io/infra= --overwrite
loop: "{{ (env.cluster.nodes.infra.hostname | default([])) }}"
loop_control:
loop_var: node

Loading