tinyblargon.systemd

Ansible 角色: systemd

用于从本地文件配置 systemd 服务/定时器的角色。

要求

角色变量

默认值

变量名 是否必需 描述 默认值 类型
systemd_file 本地服务/定时器文件的路径 "" 字符串
systemd_name 创建的 systemd 服务/定时器的名称 "" 字符串
systemd_enable 服务/定时器是否应该启用或禁用 true 布尔值
systemd_state systemd 服务/定时器的状态,可以是startedstoppedrestartedabsent之一。当为 absent 时,服务/定时器将被停止、禁用并移除。 "started" 字符串
systemd_type systemd 应该将其创建为 service 还是 timer "service" 字符串

依赖

示例 playbook

- hosts: all
  roles:
    - role: tinyblargon.systemd
      vars:
        systemd_file: "path/to/test.service"
        systemd_name: "testing-service"
        systemd_enable: false
        systemd_state: "started"
        systemd_type: "service"

许可证

MIT

关于项目

Create and configure systemd services and timers

安装
ansible-galaxy install tinyblargon.systemd
许可证
mit
下载
170
拥有者
If the DevOps tooling doesn't exist, I'll write it myself.