Playbook - updateΒΆ

Updates the services managed by the edpm_update role.

---

- name: EDPM Update
  hosts: "{{ edpm_override_hosts | default('all', true) }}"
  strategy: linear
  gather_facts: "{{ gather_facts | default(false) }}"
  any_errors_fatal: "{{ edpm_any_errors_fatal | default(true) }}"
  max_fail_percentage: "{{ edpm_max_fail_percentage | default(0) }}"
  environment: "{{ edpm_playbook_environment | default({}) }}"
  tasks:
    - name: Set edpm_update_system_enable_kpatch for backward compatibility
      ansible.builtin.set_fact:
        edpm_update_system_enable_kpatch: "{{ edpm_update_enable_kpatch }}"
      when:
        - edpm_update_system_enable_kpatch is not defined
        - edpm_update_enable_kpatch is defined

    - name: Set edpm_update_system_enable_packages_update for backward compatibility
      ansible.builtin.set_fact:
        edpm_update_system_enable_packages_update: "{{ edpm_update_enable_packages_update }}"
      when:
        - edpm_update_system_enable_packages_update is not defined
        - edpm_update_enable_packages_update is defined

    - name: Set edpm_update_system_exclude_packages for backward compatibility
      ansible.builtin.set_fact:
        edpm_update_system_exclude_packages: "{{ edpm_update_exclude_packages }}"
      when:
        - edpm_update_system_exclude_packages is not defined
        - edpm_update_exclude_packages is defined

    - name: Set edpm_update_services_enable_packages_update for backward compatibility
      ansible.builtin.set_fact:
        edpm_update_services_enable_packages_update: "{{ edpm_update_enable_packages_update }}"
      when:
        - edpm_update_services_enable_packages_update is not defined
        - edpm_update_enable_packages_update is defined

    - name: Set edpm_update_services_exclude_packages for backward compatibility
      ansible.builtin.set_fact:
        edpm_update_services_exclude_packages: "{{ edpm_update_exclude_packages }}"
      when:
        - edpm_update_services_exclude_packages is not defined
        - edpm_update_exclude_packages is defined

    - name: Set edpm_update_services_enable_containers_update for backward compatibility
      ansible.builtin.set_fact:
        edpm_update_services_enable_containers_update: "{{ edpm_update_enable_containers_update }}"
      when:
        - edpm_update_services_enable_containers_update is not defined
        - edpm_update_enable_containers_update is defined

    - name: Set edpm_update_services_running_services for backward compatibility
      ansible.builtin.set_fact:
        edpm_update_services_running_services: "{{ edpm_update_running_services }}"
      when:
        - edpm_update_services_running_services is not defined
        - edpm_update_running_services is defined

    # NOTE: It is important to use include_role rather than
    # import_role to make sure the backwards compatibility variable
    # setting logic above works as intended. The 'when' conditions
    # above depend on the variable defaults not yet being defined at
    # 'when' evaluation time.
    - name: Import edpm_update_system
      ansible.builtin.include_role:
        name: osp.edpm.edpm_update_system
      tags:
        - edpm_update_system

    - name: Import edpm_update_services
      ansible.builtin.include_role:
        name: osp.edpm.edpm_update_services
      tags:
        - edpm_update_services