--- - name: Prepare file to update attributes with apply time as Immediate hosts: all gather_facts: false vars: idrac_ip: "{{ lookup('env', 'IDRAC_IP') }}" idrac_port: "{{ lookup('env', 'IDRAC_PORT') }}" tasks: - name: Fetch IDRAC Data ansible.builtin.include_tasks: file: ../__get_data.yml vars: url: "https://{{ idrac_ip }}:{{ idrac_port }}/redfish/v1\ /Systems/System.Embedded.1/Bios" - name: Fetch the existing boot sequence retry ansible.builtin.set_fact: current_bootseq_retry: "{{ idrac_bios_uri_data.json.Attributes.BootSeqRetry }}" - name: Set the boot sequence retry mode ansible.builtin.set_fact: set_bootseq_retry: "{{ 'Disabled' if (current_bootseq_retry == 'Enabled') else 'Enabled' }}" when: set_bootseq_retry is not defined - name: Copy the variable 'set_bootseq_retry' in file ansible.builtin.copy: content: "{{ set_bootseq_retry }}" dest: "/tmp/boot_seq_retry.txt" mode: "0755" delegate_to: localhost