They do the same thing, they are aliases to each other, see this comment in the yum module source code:
# removed==absent, installed==present, these are accepted as aliases
And how are they used in the code:
if state in ['installed', 'present']: if disable_gpg_check: yum_basecmd.append('--nogpgcheck') res = install(module, pkgs, repoq, yum_basecmd, conf_file, en_repos, dis_repos) elif state in ['removed', 'absent']: res = remove(module, pkgs, repoq, yum_basecmd, conf_file, en_repos, dis_repos) elif state == 'latest': if disable_gpg_check: yum_basecmd.append('--nogpgcheck') res = latest(module, pkgs, repoq, yum_basecmd, conf_file, en_repos, dis_repos) else:
https://github.com/ansible/ansible-modules-core/blob/devel/packaging/os/yum.py
Zlemini
source share