在ansible apt中state = installed意味着什么?

Adr*_*nni 4 ansible

state=installed在ansible apt 中意味着什么?

- name: Install Node.js
  apt:
    pkg:
      - nodejs
    state: installed
    update_cache: yes
Run Code Online (Sandbox Code Playgroud)

在文档中或其他地方没有提到它.

Kon*_*rov 8

如果我们查看代码:

# 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.