community.general.lbu 模块 – Alpine Linux 的本地备份工具
注意
此模块是 community.general 集合(版本 10.1.0)的一部分。
如果您使用的是 ansible
包,您可能已经安装了此集合。它不包含在 ansible-core
中。要检查是否已安装,请运行 ansible-galaxy collection list
。
要安装它,请使用:ansible-galaxy collection install community.general
。
要在 playbook 中使用它,请指定:community.general.lbu
。
community.general 0.2.0 中的新增功能
概要
在从 RAM 运行模式下管理 Alpine Linux 的本地备份工具
参数
参数 |
注释 |
---|---|
控制是否提交更改的文件。 选择
|
|
要排除的路径列表。 |
|
要包括的路径列表。 |
属性
属性 |
支持 |
描述 |
---|---|---|
支持: 完全 |
可以在 |
|
支持: 无 |
在 diff 模式下,将返回有关已更改内容(或可能需要在 |
示例
# Commit changed files (if any)
- name: Commit
community.general.lbu:
commit: true
# Exclude path and commit
- name: Exclude directory
community.general.lbu:
commit: true
exclude:
- /etc/opt
# Include paths without committing
- name: Include file and directory
community.general.lbu:
include:
- /root/.ssh/authorized_keys
- /var/lib/misc
返回值
常见的返回值记录在此处,以下是此模块特有的字段
键 |
描述 |
---|---|
错误消息 返回: 失败时 |