摘要:
判断添加用户 - hosts: all vars: - username: test1 tasks: - name: detect whether the user exists shell: id {{ username }} register: result ignore_errors: tru 阅读全文
posted @ 2023-01-22 10:56
mingtian是吧
阅读(24)
评论(0)
推荐(0)
摘要:
| 逻辑运算 | 释义 | | | | | and | 逻辑与 | | or | 逻辑或 | | not | 逻辑取反 | 示例一: 等同于: if ansible_distribution == "CentOS" and ansible_distribution_major_version == 阅读全文
posted @ 2023-01-22 10:55
mingtian是吧
阅读(32)
评论(0)
推荐(0)
摘要:
| 比较符 | 释义 | | | | | == | 等于 | | != | 不等 | | < | 小于 | | <= | 小于等于 | | > | 大于 | | >= | 大于等于 | 示例一: 需要注意 when 使用变量时不需要 {{}} - hosts: all tasks: - name: 阅读全文
posted @ 2023-01-22 10:54
mingtian是吧
阅读(44)
评论(0)
推荐(0)
浙公网安备 33010602011771号