robertdebock.clamav

Ansible 角色 clamav

在你的系统上安装和配置 clamav。

GitHub GitLab 下载 版本
github gitlab downloads 版本

示例剧本

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

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

  roles:
    - role: robertdebock.clamav
      freshclam_private_mirrors:
        - https://www.danami.com/hotfix/clamav

机器需要进行准备。在 CI 中,使用 molecule/default/prepare.yml 来完成:

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

  roles:
    - role: robertdebock.bootstrap
    - role: robertdebock.epel

有关如何使用这些角色的 完整说明和示例

角色变量

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

---
# clamav 的默认文件

# SELinux 必须被配置以允许扫描。将 clamav_can_scan_system 设置为
# “true” 或 “false”。仅在支持 SELinux 的系统上有效。
clamav_can_scan_system: true

# 使用“regexp”和“line”配置任何参数。“regexp”参数
# 包含需要替换的行。替换内容存储在“line”中。
clamav_configuration:
  - line: "示例"
    state: absent
  - line: "TCPSocket 10025"
  - line: "TCPAddr 127.0.0.1"
  - line: "LogFile /var/log/clamd.scan"

# 如果你有本地的 clamav 镜像(根据 ClamAV 的推荐),
# 你还需要定义一个包含要添加的镜像的列表变量,
# 如下例所示:
# freshclam_private_mirrors:
#   - mirror1.mynetwork.com
#   - mirror2.mynetwork.com

要求

所用角色状态

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

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

上下文

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

以下是相关角色的概览: 依赖关系

兼容性

该角色经过以下 容器镜像 的测试:

容器 标签
Alpine 所有
Amazon 候选版本
EL 9
Debian 所有
Fedora 所有
Ubuntu 所有

要求的最低 Ansible 版本是 2.12,已进行测试:

  • 之前的版本。
  • 当前版本。
  • 开发版本。

如果发现问题,请在 GitHub 中注册。

许可证

Apache-2.0

作者信息

robertdebock

请考虑 赞助我

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