通过ansible安装ufw,但在路径中找不到



我正在新的Ubutunu 18.04安装上安装ufw。然而,在路径中似乎找不到它。我不理解的问题

- name: test
apt:
name: ufw
state: latest

- name: "Configure ufw policy"
ufw:
policy: "allow"
direction: "incoming

错误

失败!=>{"changed":false,"msg":"在路径:/usr/local/sbin:/usr/local/bin:/usr/sbin:/sbin:/usr/games:/usr/local/games中找不到所需的可执行ufw"}

所以发生这种情况似乎是因为我正在运行带有--check标志的剧本。当我在服务器上"实时"运行剧本时,这不再是一个问题。

我不确定为什么会出现此问题,因为远程服务器上已经安装了ufw程序包。。

最新更新