state=installed在ansible apt 中意味着什么?
- name: Install Node.js
apt:
pkg:
- nodejs
state: installed
update_cache: yes
Run Code Online (Sandbox Code Playgroud)
在文档中或其他地方没有提到它.
如果我们查看代码:
# Deal with deprecated aliases
if p['state'] == 'installed':
p['state'] = 'present'
if p['state'] == 'removed':
p['state'] = 'absent'
Run Code Online (Sandbox Code Playgroud)
installed是不推荐使用的形式present,
removed是一种不推荐使用的形式absent.
| 归档时间: |
|
| 查看次数: |
1995 次 |
| 最近记录: |