<commit_before>- name: Ensure config/certificates exists
  file:
    path: "{{ dnsimple_credentials_path|dirname }}"
    state: directory

- name: Copy DNSimple API token for certbot
  copy:
    src: /srv/secrets-newsblur/configs/certbot.conf
    dest: "{{ dnsimple_credentials_path }}"
  when: use_dns_plugin|bool
  tags:
    - certbot-dns

- name: pull certbot dns plugin docker image
  become: yes
  docker_image:
    state: present
    source: pull
    force_source: yes
    name: "certbot/dns-{{ dns_plugin }}:{{ certbot_version }}"
    tag: "{{ certbot_version }}"
  when: use_dns_plugin|bool
  tags:
    - certbot-dns

- name: run certbot dns plugin image
  become: yes
  docker_container:
    name: "certbot-dns-{{ dns_plugin }}"
    image: "certbot/dns-{{ dns_plugin }}:{{ certbot_version }}"
    state: started
    restart_policy: no
    container_default_behavior: no_defaults
    volumes:
      - "/etc/letsencrypt:/etc/letsencrypt"
      - "/var/lib/letsencrypt:/var/lib/letsencrypt"
      - "/var/log/letsencrypt:/var/log/letsencrypt"
      - "/srv/newsblur/config/certificates:/srv/newsblur/config/certificates"
    command: >-
      certonly --agree-tos -m {{ email }} -d {{ domains_list | join(' -d ') }}
      --dns-{{ dns_plugin }} --dns-{{ dns_plugin }}-propagation-seconds 60
      --dns-{{ dns_plugin }}-credentials {{ dnsimple_credentials_path }}
      --server https://acme-v02.api.letsencrypt.org/directory
  when: use_dns_plugin|bool<commit_msg>Reload haproxy on cert update<commit_after>- name: Ensure config/certificates exists
  file:
    path: "{{ dnsimple_credentials_path|dirname }}"
    state: directory

- name: Copy DNSimple API token for certbot
  copy:
    src: /srv/secrets-newsblur/configs/certbot.conf
    dest: "{{ dnsimple_credentials_path }}"
  when: use_dns_plugin|bool
  tags:
    - certbot-dns

- name: pull certbot dns plugin docker image
  become: yes
  docker_image:
    state: present
    source: pull
    force_source: yes
    name: "certbot/dns-{{ dns_plugin }}:{{ certbot_version }}"
    tag: "{{ certbot_version }}"
  when: use_dns_plugin|bool
  tags:
    - certbot-dns

- name: run certbot dns plugin image
  become: yes
  docker_container:
    name: "certbot-dns-{{ dns_plugin }}"
    image: "certbot/dns-{{ dns_plugin }}:{{ certbot_version }}"
    state: started
    restart_policy: no
    container_default_behavior: no_defaults
    volumes:
      - "/etc/letsencrypt:/etc/letsencrypt"
      - "/var/lib/letsencrypt:/var/lib/letsencrypt"
      - "/var/log/letsencrypt:/var/log/letsencrypt"
      - "/srv/newsblur/config/certificates:/srv/newsblur/config/certificates"
    command: >-
      certonly --agree-tos -m {{ email }} -d {{ domains_list | join(' -d ') }}
      --dns-{{ dns_plugin }} --dns-{{ dns_plugin }}-propagation-seconds 60
      --dns-{{ dns_plugin }}-credentials {{ dnsimple_credentials_path }}
      --server https://acme-v02.api.letsencrypt.org/directory
  when: use_dns_plugin|bool
  notify: reload haproxy
{'fraction_non_alphanumeric': 0.1371102916526986, 'fraction_numerical': 0.0026818638954073082, 'mean_word_length': 3.1675977653631286, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 2, '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': '6880517', 'n_tokens_mistral': 1095, 'n_tokens_neox': 1057, 'n_words': 210}