l3d.acmetool
Acmetool LEクライアント
acmetool
LEクライアントをインストールして設定します。
このロールは、do1jlr.nginxのAnsibleロールと一緒に使用することをお勧めしますが、単体でも使用できます。
do1jlr.nginx
ロールは、nginxのHTTPSサイトを有効にするフックをインストールし、acmetool want $domain
コマンドを実行します。または、必要なドメインをacme_domain_want_list: []
に追加します。ただし、acmetoolがドメインを要求できるように設定しておく必要があります。response-file.yml.j2
を設定した方が良いかもしれません。
変数
acme_notification_email:
(デフォルト:[email protected]
): LEアカウントのメールアドレス。デフォルトは変更する必要があります!acme_reload_services:
(デフォルト:[]
): 証明書の変更によって再読み込みが必要なサービス (予め定義されたサービスはfiles/reloadファイルにあります)acme_restart_services:
(デフォルト:[]
): 証明書の変更によって再起動が必要なサービスacme_domain_want_list:
(デフォルト:[]
): 有効にしたいドメインのリスト。例:
acme_domain_want_list:
- name: 'www.example.com'
acme_domain_unwant_list:
(デフォルト:[]
): 有効にしたドメインを無効にします。acme_domain_want_list
と同じ構文です。submodules_versioncheck:
(デフォルト:false
): 基本的なバージョンチェックを有効にします。(true
をお勧めします)
ファイル
response-file.yml.j2
を以下の設定でfiles/reloadを使って検索します:
files:
- "response-file.{{ inventory_hostname }}.yml.j2"
- 'response-file.yml.j2'
paths:
- 'templates/acmetool'
- "templates/{{ inventory_hostname }}"
- 'files/acmetool'
- "files/{{ inventory_hostname }}"
- 'templates'
このファイルは、証明書の種類、チャレンジメソッド、ACME通知メールなど、acmetoolの動作を設定します。自分のresponse-file.yml.j2
を使って値を変更してください。
reload
とrestart
のフックを、vars/main.yml
に定義された設定を使ってfiles/reloadで検索します。acme_reload_services:
およびacme_restart_services:
変数に基づいてacme-reload
とacme-restart
の設定を展開します。
参考
知っておくと良いこと
- Debian Busterを使用している場合、より最新のacmetoolのバージョンに興味があるかもしれません。do1jlr.acmetool_fixロールを確認してください。これにより、Debianベースのシステムに特定のバージョンのacmetoolがインストールされます。
- ドメインを手動でacmetoolに追加するには、
acmetool want example.com
を実行します。 - ドメインを手動でacmetoolから削除するには、
acmetool unwant example.com
を実行します。
Install acmetool, an easy-to-use command line tool for automatically acquiring certificates from ACME servers (eg. Let's Encrypt)
ansible-galaxy install l3d.acmetool