-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: update the ignition download so it only downloads with MTU 9100 …
…in the ignition Signed-off-by: Paul Bastide <[email protected]>
- Loading branch information
Showing
3 changed files
with
113 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
--- | ||
- hosts: all | ||
vars_files: | ||
- ../vars/main.yml | ||
|
||
#################################################################################### | ||
# Verify and Validate prior to starting execution | ||
pre_tasks: | ||
- name: Verify Ansible version. | ||
assert: | ||
that: "ansible_version.full is version_compare('2.12', '>=')" | ||
msg: > | ||
"You must update Ansible to at least 2.12" | ||
#################################################################################### | ||
tasks: | ||
|
||
- name: Create Apache directories for installing | ||
file: | ||
path: "{{ item }}" | ||
state: directory | ||
mode: 0755 | ||
with_items: | ||
- /var/www/html/ignition | ||
|
||
- name: Disable fcontext | ||
shell: "semanage fcontext -a -t httpd_sys_rw_content_t /var/www/html/ignition/worker.ign || true" | ||
- name: Download the Ignition file | ||
block: | ||
- name: Loop until TARGET_MTU is correct | ||
ansible.builtin.uri: | ||
url: "{{ openshift_machine_config_url }}" | ||
method: GET | ||
return_content: true | ||
headers: | ||
"Accept": "application/vnd.coreos.ignition+json;version=3.2.0" | ||
ignore_errors: true | ||
register: result | ||
retries: 120 | ||
delay: 10 | ||
until: 'result.status in [200] and "TARGET_MTU=9100" in result.content' | ||
- name: Downloading the ignition file | ||
get_url: | ||
url: "{{ openshift_machine_config_url }}" | ||
dest: /var/www/html/ignition/worker.ign | ||
validate_certs: false | ||
headers: | ||
"Accept": "application/vnd.coreos.ignition+json;version=3.2.0" | ||
ignore_errors: true | ||
register: result | ||
retries: 120 | ||
delay: 10 | ||
until: '"Request failed: <urlopen error timed out>" not in result.msg' | ||
- name: Downloading the ignition file using a https_proxy | ||
get_url: | ||
url: "{{ openshift_machine_config_url }}" | ||
dest: /var/www/html/ignition/worker.ign | ||
validate_certs: false | ||
headers: | ||
"Accept": "application/vnd.coreos.ignition+json;version=3.2.0" | ||
ignore_errors: true | ||
environment: | ||
https_proxy: http://{{ vpc_support_server_ip }}:3128 | ||
|
||
- name: Verify the ignition file exists | ||
ansible.builtin.shell: stat /var/www/html/ignition/worker.ign | ||
|
||
- name: Make ignition file readable through the www dir | ||
ansible.builtin.file: | ||
path: /var/www | ||
owner: apache | ||
group: apache | ||
recurse: true | ||
mode: u+rwx,g-rx,o-rx | ||
|
||
- name: Best effort SELinux repair - Apache | ||
shell: "restorecon -vR /var/www/html/ignition || true" |
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
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