robertdebock.apt_autostart

Ansible角色 apt_autostart

启用或禁用在安装软件包时自动启动服务。

GitHub GitLab 下载 版本
github gitlab downloads Version

示例剧本

此示例来自molecule/default/converge.yml,并在每次推送、拉取请求和发布时进行测试。

---
- name: Converge
  hosts: all
  become: true
  gather_facts: true

  roles:
    - role: robertdebock.apt_autostart

机器需要被准备好。在CI中,这通过molecule/default/prepare.yml进行:

---
- name: Prepare
  hosts: all
  gather_facts: false
  become: true

  roles:
    - role: robertdebock.bootstrap

另请参见完整说明和示例以了解如何使用这些角色。

角色变量

变量的默认值在defaults/main.yml中设置:

---
# apt_autostart的默认文件

# 在使用apt安装软件时是否应管理服务?
apt_autostart_state: disabled

要求

所需角色状态

以下角色用于准备系统。您可以以其他方式准备系统。

需求 GitHub GitLab
robertdebock.bootstrap Build Status GitHub Build Status GitLab

上下文

这个角色是许多兼容角色的一部分。有关更多信息,请查看这些角色的文档

以下是相关角色的概述: dependencies

兼容性

此角色已在以下容器镜像上进行测试:

容器 标签
Debian 所有
Ubuntu 所有

所需的最低Ansible版本为2.12,测试已在以下环境中进行:

  • 上一个版本。
  • 当前版本。
  • 开发版本。

如果您发现问题,请在GitHub上反馈。

许可证

Apache-2.0

作者信息

robertdebock

请考虑赞助我

关于项目

Enable or disable automatic starting of services upon installation of packages.

安装
ansible-galaxy install robertdebock.apt_autostart
许可证
apache-2.0
下载
141.8k
拥有者
I know my way around (Linux) infrastructure, have a passion for automation, Docker, Ansible, Molecule and ci/cd.