--- - name: Load a tasks file based on the OS type. include: "{{ item }}" with_first_found: - "install-with-package-{{ ansible_distribution }}-{{ ansible_distribution_version }}.yml" - "install-with-package-{{ ansible_distribution }}.yml" - "install-with-package-{{ ansible_os_family }}.yml" ignore_errors: true - name: Install Certbot. package: "name={{ certbot_package }} state=present" - name: Set Certbot script variable. set_fact: certbot_script: "{{ certbot_package }}"