-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
75 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
73 changes: 73 additions & 0 deletions
73
ansible/roles/openshift-4-cluster/tasks/prepare-host-Rocky-9.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
--- | ||
- name: Installing KVM Packages | ||
ansible.builtin.package: | ||
name: | ||
- "@virtualization-hypervisor" | ||
- "@virtualization-client" | ||
- "@virtualization-platform" | ||
- "@virtualization-tools" | ||
# ansible virt need lxml | ||
- python3-lxml | ||
- firewalld | ||
state: present | ||
|
||
- name: Upgrade all packages | ||
ansible.builtin.package: | ||
name: '*' | ||
state: latest | ||
register: update | ||
|
||
- name: Check if new kernel has been installed and local execution | ||
ansible.builtin.set_fact: | ||
hetzner_ocp4_prepare_host_reboot_needed: true | ||
when: | ||
- update.changed | ||
- update.results | select('match','Installed:.*kernel.*') | length > 0 | ||
tags: | ||
- skip_ansible_lint | ||
|
||
- name: Enable & Start firewalld | ||
ansible.builtin.service: | ||
name: firewalld | ||
state: started | ||
enabled: true | ||
|
||
- name: Allow NFS traffic from VM's to Host | ||
ansible.posix.firewalld: | ||
zone: libvirt | ||
state: enabled | ||
permanent: yes | ||
service: "{{ item }}" | ||
with_items: | ||
- nfs | ||
- mountd | ||
- rpc-bind | ||
notify: 'reload firewalld' | ||
|
||
- name: Allow OpenShift traffic from VM's to Host | ||
ansible.posix.firewalld: | ||
zone: libvirt | ||
state: enabled | ||
permanent: yes | ||
port: "{{ item }}" | ||
with_items: | ||
- 80/tcp | ||
- 443/tcp | ||
- 6443/tcp | ||
- 22623/tcp | ||
notify: 'reload firewalld' | ||
|
||
- name: Allow OpenShift traffic from public to Host | ||
ansible.posix.firewalld: | ||
zone: public | ||
state: enabled | ||
permanent: yes | ||
port: "{{ item }}" | ||
with_items: | ||
- 80/tcp | ||
- 443/tcp | ||
- 6443/tcp | ||
notify: 'reload firewalld' | ||
|
||
- name: firewalld reload | ||
ansible.builtin.command: firewall-cmd --reload |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters