--- - name: create /opt/certbot file: path: /opt/certbot mode: 0750 state: directory - name: download certbot get_url: url: https://raw.githubusercontent.com/certbot/certbot/master/certbot-auto dest: /opt/certbot/certbot-auto mode: 0550 - name: create webroot path file: path: "{{ letsrenew_webroot }}" state: directory - name: create /etc/letsencrypt file: path: /etc/letsencrypt state: directory - name: template cli.ini template: src: cli.ini.j2 dest: /etc/letsencrypt/cli.ini - name: clone letsrenew git: repo: https://github.com/7adietri/letsrenew.git dest: /opt/letsrenew - name: create cronjob cron: name: "Let's Encrypt certificate renewal" job: "/opt/letsrenew/letsrenew {{ letsrenew_email }} /opt/certbot/certbot-auto" minute: 0 hour: 6 weekday: 1