diff --git a/ansible/support/tasks/ignition.yml b/ansible/support/tasks/ignition.yml index 1445303..5df17e8 100644 --- a/ansible/support/tasks/ignition.yml +++ b/ansible/support/tasks/ignition.yml @@ -1,18 +1,7 @@ --- - hosts: all - #################################################################################### - # 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 }}" @@ -23,35 +12,24 @@ - 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 -# validate_certs: false -# 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]' - # This conditional is updated when the MTU is changed - and "TARGET_MTU=9100" in result.content - - name: Downloading the ignition file - get_url: + - name: Loop until TARGET_MTU is correct + ansible.builtin.uri: url: "{{ openshift_machine_config_url }}" - dest: /var/www/html/ignition/worker.ign - validate_certs: false + method: GET + return_content: true headers: "Accept": "application/vnd.coreos.ignition+json;version=3.2.0" + validate_certs: false ignore_errors: true register: result retries: 120 delay: 10 - until: '"Request failed: " not in result.msg' - - name: Downloading the ignition file using a https_proxy + until: 'result.status in [200] and "mpath" not in result.content' + + - name: Downloading the ignition file get_url: url: "{{ openshift_machine_config_url }}" dest: /var/www/html/ignition/worker.ign @@ -59,8 +37,10 @@ headers: "Accept": "application/vnd.coreos.ignition+json;version=3.2.0" ignore_errors: true - # environment: - # https_proxy: http://{{ vpc_support_server_ip }}:3128 + register: result + retries: 120 + delay: 10 + until: '"Request failed: " not in result.msg' - name: Verify the ignition file exists ansible.builtin.shell: stat /var/www/html/ignition/worker.ign diff --git a/modules/4_pvs_support/pvs_support.tf b/modules/4_pvs_support/pvs_support.tf index 5c43088..89a42ea 100644 --- a/modules/4_pvs_support/pvs_support.tf +++ b/modules/4_pvs_support/pvs_support.tf @@ -311,7 +311,6 @@ EOF # Dev Note: do this as the last step so we get a good worker ignition file downloaded. resource "null_resource" "latest_ignition" { - # depends_on = [null_resource.wait_on_mcp] depends_on = [null_resource.set_routing_via_host] connection { type = "ssh"