--- - name: Ensure package repo is present apt_repository: repo: ppa:certbot/certbot when: ansible_distribution == "Ubuntu" or ansible_distribution == "Debian" - name: Install Certbot. package: "name={{ certbot_package }} state=present" - name: Set Certbot script variable. set_fact: certbot_script: "{{ certbot_package }}"