Skip to content

Commit

Permalink
test a san name
Browse files Browse the repository at this point in the history
  • Loading branch information
kayiwa committed May 23, 2024
1 parent cc234e6 commit dc56500
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
9 changes: 4 additions & 5 deletions playbooks/incommon_certbot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@
roles:
- role: roles/acme

- name: tell everyone on slack you ran an ansible playbook
community.general.slack:
token: "{{ vault_pul_slack_token }}"
msg: "Ansible ran `{{ ansible_play_name }}` on {{ inventory_hostname }}"
channel: "{{ slack_alerts_channel }}"
post_tasks:
- name: send information to slack
ansible.builtin.include_tasks:
file: utils/slack_tasks_end_of_playbook.yml
3 changes: 3 additions & 0 deletions roles/acme/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,14 @@

- name: ACME | update acme certificates for {{ acme_domain_name }}
ansible.builtin.command: /usr/bin/certbot certonly --standalone --non-interactive --agree-tos --email [email protected] --server https://acme.sectigo.com/v2/InCommonRSAOV --eab-kid {{ vault_acme_eab_kid }} --eab-hmac-key {{ vault_acme_eab_hmac_key }} --domain {{ acme_domain_name }}.princeton.edu --cert-name {{ acme_domain_name }}
tags: add_domain

- name: ACME | update acme certificates for {{ acme_domain_name }} multi domain
ansible.builtin.command: /usr/bin/certbot certonly --standalone --non-interactive --agree-tos --email [email protected] --server https://acme.sectigo.com/v2/InCommonRSAOV --eab-kid {{ vault_acme_eab_kid }} --eab-hmac-key {{ vault_acme_eab_hmac_key }} --domain {{ acme_domain_name }}.princeton.edu --domain {{ acme_add_san_name }}.princeton.edu --cert-name {{ acme_domain_name }}
tags: add_san

- name: ACME | revoke acme certificates for {{ acme_domain_name }}
ansible.builtin.command: /usr/bin/certbot revoke --standalone --non-interactive --agree-tos --email [email protected] --server https://acme.sectigo.com/v2/InCommonRSAOV --eab-kid {{ vault_acme_eab_kid }} --eab-hmac-key {{ vault_acme_eab_hmac_key }} --domain {{ acme_domain_name }}.princeton.edu --cert-path /etc/letsencrypt/live/{{ acme_domain_name }}/cert.pem
become_user: root
become: true
tags: revoke
6 changes: 4 additions & 2 deletions roles/acme/vars/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
---
# vars file for roles/acme
acme_add_san_name: []
acme_domain_name: []
acme_add_san_name:
- sandbox-fkayiwa.lib
acme_domain_name:
- sandbox-fkayiwa1.lib

0 comments on commit dc56500

Please sign in to comment.