nephelaiio.acme_certificate_cloudflare

nephelaiio.acme-certificate-cloudflare

构建状态
Ansible Galaxy

这是一个 Ansible 角色,用于通过 Cloudflare 的名称服务以 DNS 验证挑战来签发 ACME 证书。

角色变量

角色中最常见的可被用户覆盖的参数是:

必需 变量 描述 默认值
acme_certificate_domain 要生成 ACME 证书的完全限定域名 ansible_fqdn
acme_certificate_email 用于生成 ACME 证书的邮箱 未定义
acme_certificate_cf_account_token Cloudflare API 用户令牌 lookup('env', 'CF_ACCOUNT_TOKEN')
acme_certificate_group_members 添加到证书文件所有者组的成员 []
acme_certificate_add_ca 是否添加 ACME CA false
acme_certificate_caurl CA 证书的 URL https://letsencrypt.org/certs/isrgrootx1.pem.txt
acme_certificate_directory CA 目录的 URL https://acme-v01.api.letsencrypt.org/directory
acme_certificate_cafile (*) 定义以创建指向签发 CA 证书文件的符号链接 _未定义
acme_certificate_intcafile (*) 定义以创建指向签发中间 CA 证书文件的符号链接 未定义
acme_certificate_certfile (*) 定义以创建指向证书文件的符号链接 未定义
acme_certificate_chainfile (*) 定义以创建指向证书链文件的符号链接 未定义
acme_certificate_keyfile (*) 定义以创建指向证书密钥文件的符号链接 未定义

你可以在 CI 测试配置文件 中查看上述部分参数的重新定义示例,特别是有关证书 CA 的设置。

(*) 有助于与现有 nginx/apache 配置的向后兼容性。

请参考 默认文件 获取最新的输入参数列表。

依赖项

有关更多详细信息,请参见 https://raw.githubusercontent.com/nephelaiio/ansible-role-requirements/master/requirements.txtmeta.yml 文件。

示例剧本

- hosts: servers
  vars:
    acme_certificate_email: [email protected]
    acme_certificate_domain: "{{ ansible_fqdn }}"
    acme_certificate_cf_account_token: xxxxxxxxxx
  roles:
    - role: nephelaiio.acme-certificate-cloudflare

测试

请确保您的环境中已安装 docker,以便运行角色验证测试。其他 Python 依赖项列在 requirements file 中。

角色将针对以下发行版(Docker 镜像)进行测试:

  • Ubuntu Jammy
  • Ubuntu Focal
  • Ubuntu Bionic
  • Debian Bullseye
  • Debian Buster
  • Rocky Linux 8
  • Rocky Linux 9

您可以使用命令 molecule test 从源代码直接测试角色。

许可证

本项目根据 MIT 许可证 授权。

关于项目

An ansible role to generate acme certificates using dns challenges with cloudflare dns

安装
ansible-galaxy install nephelaiio.acme_certificate_cloudflare
许可证
mit
下载
17.7k
拥有者