buluma.ca
Ansible角色 ca
在您的系统上安装和配置证书授权机构。
GitHub | 版本 | 问题 | 拉取请求 | 下载量 |
---|---|---|---|---|
示例剧本
此示例取自 molecule/default/converge.yml
,并在每次推送、拉取请求和发布时进行测试。
---
- name: 合并
hosts: all
become: true
gather_facts: true
roles:
- role: buluma.ca
需要准备机器。在CI中,这是通过 molecule/default/prepare.yml
完成的:
---
- name: 准备
hosts: all
become: true
gather_facts: false
roles:
- role: buluma.bootstrap
- role: buluma.buildtools
- role: buluma.epel
- role: buluma.python_pip
- role: buluma.openssl
openssl_items:
- name: apache-httpd
common_name: "{{ ansible_fqdn }}"
- role: buluma.httpd
有关如何使用这些角色的完整说明和示例。
角色变量
变量的默认值在 defaults/main.yml
中设置:
---
# ca的默认值文件
# 设置 ca_init: 'yes' 以创建 CA
ca_init: true
# 如果您想拥有自己的根 CA,设置 ca_own_root: 'yes'。
# 如果不想,手动设置 ca_certificate_path
ca_own_root: true
# 证书授权机构密钥的密码短语。
ca_passphrase: SuP3rS3cr3T
# 证书授权机构的公共名称。
ca_common_name: example.com
# 证书授权机构的其他详细信息。
ca_country_name: KE
ca_email_address: [email protected]
ca_organization_name: Very little
ca_organizational_unit_name: Even less
ca_state_or_province_name: Nairobi
ca_locality_name: Nairobi
# 请求密钥和证书有两种格式:
# 1. 包含详细信息:(包括 `name:`)
# ca_requests:
# - name: certificate1.example.com
# passphrase: S3creT
#
# 2. 不包含详细信息:(不包括 `name:`)
# ca_requests:
# - "{{ ansible_fqdn }}"
# 也可以混合使用这些格式:
# ca_requests:
# - name: certificate1.example.com
# passphrase: S3creT
# - "{{ ansible_fqdn }}"
# 证书发布的位置,通常是一个 Web 服务器位置。
# 如果未指定,将不会发布证书。
# {{ httpd_data_directory }} 从 buluma.httpd 角色中继承。
ca_publication_location: "{{ httpd_data_directory | default('/tmp') }}/pub"
# 证书需要存储在哪里?默认为发行版
# 首选位置(见 `vars/main.yml`,在 `_ca_openssl_path`下)。
# 如果您需要在其他地方提供 CA 证书,只需使用如下设置:
# ca_openssl_path: /my/preferred/path
ca_openssl_path: "{{ _ca_openssl_path[ansible_os_family] | default(_ca_openssl_path['default']) }}"
要求
- 在 requirements.txt 中列出的pip包。
使用角色状态
以下角色用于准备系统。您可以以其他方式准备系统。
需求 | GitHub | 版本 |
---|---|---|
buluma.bootstrap | ||
buluma.buildtools | ||
buluma.epel | ||
buluma.httpd | ||
buluma.openssl | ||
buluma.python_pip |
上下文
此角色是许多兼容角色的一部分。有关更多信息,请查看这些角色的文档。
以下是相关角色的概述:
兼容性
此角色已在以下 容器镜像上进行测试:
容器 | 标签 |
---|---|
EL | 9 |
Debian | 所有 |
Fedora | 38, 39, 40 |
opensuse | 所有 |
Ubuntu | jammy, noble |
所需的最小Ansible版本为2.12,已对以下版本进行了测试:
- 上一个版本。
- 当前版本。
- 开发版本。
如果发现问题,请在 GitHub 注册。
更新日志
许可证
作者信息
关于项目
Install and configure a certificate authority on your system.
安装
ansible-galaxy install buluma.ca
许可证
apache-2.0
下载
10.6k
拥有者
DevOps Engineer