mivek.ddclient
Ansible角色:DDClient
此角色安装并启动一个ddclient服务。
需求
没有特别的要求
角色变量
变量来自ddclient配置
默认变量
ddclient_version: 3.9.1 # 仅在从源代码安装时使用
ddclient_configuration_template: templates/ddclient.conf.j2
ddclient_service_template: templates/ddclient.service.j2
ddclient_daemon: 300
ddclient_install_from_source: false
ddclient_ssl: 'yes'
ddclient_configs:
-
protocol: dnspark
use: null
server: null
backupmx: null
mx: null
mxpri: null
wildcard: null
login: login
password: password
hosts:
- host
变量设置
__ddclient_configuration_directory: /etc/ddclient
__ddclient_configuration_location: "{{ __ddclient_configuration_directory }}/ddclient.conf"
__ddclient_download_url: https://github.com/ddclient/ddclient/archive/refs/tags/v{{ ddclient_version }}.tar.gz
__ddclient_download_location: /tmp/ddclient-{{ ddclient_version }}.tar.gz
__ddclient_unarchive_location: /tmp
__ddclient_service_file: /etc/systemd/system/ddclient.service
__ddclient_prerequisite:
- g++
- perl
- make
依赖
没有特别的依赖
示例剧本
为用户提供一个如何使用该角色的示例(比如传入变量作为参数)是很有帮助的:
- hosts: servers
become: true
tasks:
- import_role:
name: ddclient
vars:
daemon: 60
configs:
-
protocol: dyndns2
login: myLogin
password: myPassword
use: web
server: null
backupmx: null
mx: null
mxpri: null
wildcard: null
hosts:
- myhost.dyndns.org
许可证
MIT
安装
ansible-galaxy install mivek.ddclient
许可证
mit
下载
89