<commit_before>- name: Install letsencrypt
  apt: name=letsencrypt state=present
  when: letsencrypt.enabled == true

- name: Get letsencrypt cert
  command: bash -lc "letsencrypt certonly --standalone --rsa-key-size 4096 --force-renew --agree-tos --email {{ letsencrypt.email }} --text --non-interactive -d {{ letsencrypt.hostname }}"
  args:
    creates: "/etc/letsencrypt/live/{{ letsencrypt.hostname }}/privkey.pem"
  when: letsencrypt.enabled == true

- name: Set cert to renew every monday at 2:30 am
  cron:
    name: Certbot renew
    weekday: 1
    hour: 2
    minute: 30
    job: /usr/bin/letsencrypt renew --rsa-key-size 4096 >> /var/log/le-renew.log
    user: root
  when: letsencrypt.enabled == true<commit_msg>Restart nginx when certbot renews certificate<commit_after>- name: Install letsencrypt
  apt: name=letsencrypt state=present
  when: letsencrypt.enabled == true

- name: Get letsencrypt cert
  command: bash -lc "letsencrypt certonly --standalone --rsa-key-size 4096 --force-renew --agree-tos --email {{ letsencrypt.email }} --text --non-interactive -d {{ letsencrypt.hostname }}"
  args:
    creates: "/etc/letsencrypt/live/{{ letsencrypt.hostname }}/privkey.pem"
  when: letsencrypt.enabled == true

- name: Set cert to renew every monday at 2:30 am
  cron:
    name: Certbot renew
    weekday: 1
    hour: 2
    minute: 30
    job: /usr/bin/letsencrypt renew --rsa-key-size 4096 --renew-hook "/usr/bin/monit restart nginx" >> /var/log/le-renew.log
    user: root
  when: letsencrypt.enabled == true
{'fraction_non_alphanumeric': 0.12992125984251968, 'fraction_numerical': 0.01968503937007874, 'mean_word_length': 3.283707865168539, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6416730', 'n_tokens_mistral': 546, 'n_tokens_neox': 516, 'n_words': 146}