ansible - 找不到python模块防火墙
问题描述
- 计算机运行 ansible-playbook:MacBook,带有 python 3.9
- 目标机器:带有python2.7.16和python3.7.3的Debian 10
当我尝试在防火墙中打开端口时:
- name: Open port 80 for http access
firewalld:
service: http
permanent: true
state: enabled
我收到错误:
致命:[virtual_server]:失败!=> {"changed": false, "msg": "Python Module not found: firewalld and its python module is required for this module, version 0.2.11 or later (0.3.9 or newer for offline operations)"}
我还尝试ansible-galaxy collection install ansible.posix
在 macbook 上使用 ansible.posix.firewall,并使用 ansible.posix.firewall,仍然出现此错误。
谁能告诉我有什么问题?
解决方案
Ansible 基本上是说firewalld
没有安装,安装解决问题:
apt-get install firewalld
Firewalld 默认安装在 Centos 上,但不安装在 Debian 上。
推荐阅读
- c# - 绑定 MVVM WPF 后添加到 Combobox
- postgresql - Postgres / JDBC 与 pgjdbc-ng:将 EAN 类型写入数据库
- firebase-storage - 如何升级到 Firebase 存储规则 v2
- c++ - 卡在项目 euler 的问题 8 上,得到错误的答案,但代码似乎正确
- c - 如何处理 C 中输入的数字太大?
- python - 如何通过匹配某个元素来填充二维数组的所有行?
- angular - 关于测试 Angular $localize (Angular 9) 的建议
- amazon-web-services - Boto3 SES 抛出 TypeError: sequence item 0: expected str instance, tuple found
- javascript - 如何使用 d3.js 以编程方式触发拖动事件?
- python - 如何使用 python webbot 获取包含标签的文本?