---
- ansible.builtin.import_tasks: include-vars.yml
- ansible.builtin.import_tasks: setup-RedHat.yml
  when: ansible_facts.os_family == 'RedHat'

- ansible.builtin.import_tasks: install-with-package.yml
  when: certbot_install_method == 'package'

- ansible.builtin.import_tasks: install-with-snap.yml
  when: certbot_install_method == 'snap'

- ansible.builtin.import_tasks: install-from-source.yml
  when: certbot_install_method == 'source'

- ansible.builtin.include_tasks: create-cert-standalone.yml
  with_items: "{{ certbot_certs }}"
  when:
    - certbot_create_if_missing
    - certbot_create_method == 'standalone'
  loop_control:
    loop_var: cert_item

- ansible.builtin.include_tasks: create-cert-webroot.yml
  with_items: "{{ certbot_certs }}"
  when:
    - certbot_create_if_missing
    - certbot_create_method == 'webroot'
  loop_control:
    loop_var: cert_item

- ansible.builtin.import_tasks: renew-cron.yml
  when: certbot_auto_renew
