如何在Mac系统里面更新 Ansible 的 Extra Modules

最近遇到一个问题

seport is not a legal parameter in an Ansible task or handler

原因是我本地 Ansible 的 Extra Modules 已经过时,需要更新。但是Ansible的官方文档只给了这么一句话

There should be no need to install this repo separately as it should be included in any Ansible install using the official documented methods.

只好自己折腾。。

命令如下

1 sudo su
2 cd /Library/Python/2.7/site-packages/ansible/modules 
3 mv extras extras.bak
4 git clone https://github.com/ansible/ansible-modules-extras.git extras

搞定

原文地址:https://www.cnblogs.com/e2tox/p/5026545.html