l3o.nginx_letsencrypt_pod

nginx_letsencrypt_pod

这个 Ansible 角色使用 podman 设置 nginx 和 letsencrypt 容器。

角色变量

变量
nginx_domains 需要显示默认页面的域名列表
letsencrypt_domains 请求证书的域名列表
letsencrypt_camail 用于请求证书的邮件地址
nginx_container_name nginx(默认)
letsencrypt_container_name certbot(默认)
nginx_http_ip http 端口应该绑定到的主机 IP 地址(可选)
nginx_https_ip https 端口应该绑定到的主机 IP 地址(可选)
nginx_http_port 8080(默认)
nginx_https_port 8443(默认)
nginx_rootdir /tmp/nginx(默认)
letsencrypt_rootdir /tmp/letsencrypt(默认)
nginx_webroot /usr/share/nginx/html(默认)
nginx_confdir /etc/nginx/conf.d(默认)
nginx_static_config 包含静态配置文件的目录列表(可选)
nginx_static_site 包含静态网站目录的目录列表(可选)
nginx_extra_volumes 额外的绑定挂载列表:主机目录和容器目录的键/值(可选)
letsencrypt_confdir /etc/letsencrypt(默认)
letsencrypt_statedir /var/lib/letsencrypt(默认)
nginx_container_image quay.io/cfelder/nginx:stable-www-data(默认)
letsencrypt_container_image docker.io/certbot/certbot:latest(默认)
podman_network_name podman(默认)
container_state present(默认)或 absent

依赖项

示例剧本

以下剧本为 www.example.com 设置 nginx 和 letsencrypt 容器:

    - name: 设置 nginx  letsencrypt 容器
      hosts: all
      tasks:
        - include_role:
            name: nginx_letsencrypt_pod
          vars:
            nginx_rootdir: "/tmp/nginx_ex"
            letsencrypt_rootdir: "/tmp/letsencrypt_ex"
            letsencrypt_camail: "[email protected]"
            nginx_http_port: "80"
            nginx_https_port: "443"
            nginx_domains:
              - "www.example.com"
            letsencrypt_domains: "{{ nginx_domains }}"

许可证

GPLv3+

作者信息

Christian Felder

安装
ansible-galaxy install l3o.nginx_letsencrypt_pod
许可证
Unknown
下载
83
拥有者