我有以下Ansible剧本:
---
- hosts: all
module_defaults:
apt:
force_apt_get: yes
remote_user: ubuntu
tasks:
- name: Install gnupg2
apt: name=gnupg2 state=latest
- name: ensure nginx is at the latest version
apt: name=nginx state=latest
- name: start nginx
service:
name: nginx
state: started
nginx安装成功。 Ansible告诉我gnupg2
安装成功,但是当我SSH进入主机并运行gpg2
命令时,找不到gpg2
。
如何使我的剧本成功安装gpg2
?