--- - name: Clone Certbot into configured directory. become: true git: repo: "{{ certbot_repo }}" dest: "{{ certbot_dir }}" version: "{{ certbot_version }}" update: "{{ certbot_keep_updated }}" force: true - name: Set Certbot script variable. set_fact: certbot_script: "{{ certbot_dir }}/certbot-auto" - name: Ensure certbot-auto is executable. file: path: "{{ certbot_script }}" mode: 0755 - name: Install plugins become: true pip: name: "file://{{ my_certbot_dir}}/certbot-{{ item }}/" state: present extra_args: --upgrade with_items: - "{{ certbot_plugins }}" when: certbot_plugins is defined