文件操作 - bool.yml
返回文件管理
返回主菜单
删除本文件
文件: /usr/lib/python3.12/site-packages/ansible/plugins/filter/bool.yml
编辑文件内容
DOCUMENTATION: name: bool version_added: "historical" short_description: cast into a boolean description: - Attempt to cast the input into a boolean (V(True) or V(False)) value. positional: _input options: _input: description: Data to cast. type: raw required: true EXAMPLES: | # in vars vars: isbool: "{{ (a == b) | bool }} " otherbool: "{{ anothervar | bool }} " # in a task ... when: some_string_value | bool RETURN: _value: description: The boolean resulting of casting the input expression into a V(True) or V(False) value. type: bool
修改文件时间
将文件时间修改为当前时间的前一年
删除文件