用于git添加/提交/推送操作的Ansible模块。
git-acp-ansible的Python项目详细描述
git acp ansible公司
git_acp
是本地或远程(https/ssh)git repo上git add
、git commit
、git push
和{
PyPi安装:
要安装模块,只需运行以下命令:
pip install git-acp-ansible
编辑ansible.cfg
文件并添加git_acp
模块的安装路径。在
即
[defaults]
library = ./lib/python3.7/site-packages/git-acp-ansible/modules
如果运行virtualenv
,则路径很可能与上面的示例类似。
否则,您可以使用例如mlocate
来查找模块所在的位置。在
有关详细信息,请查看Ansible Docs
安装Ansible Galaxy(适用于Ansible 2.9版)
与Ansible Galax安装相关的所有信息都可用here
模块文档:
^{pr2}$示例:
- name: HTTPS | add file1.
git_acp:
user: Federico87
token: mytoken
path: /Users/git/git_acp
branch: master
comment: Add file1.
remote: origin
add: [ "." ]
mode: https
url: "https://gitlab.com/networkAutomation/git_test_module.git"
- name: SSH | add file1.
git_acp:
path: /Users/git/git_acp
branch: master
comment: Add file1.
add: [ file1 ]
remote: dev_test
mode: ssh
url: "git@gitlab.com:networkAutomation/git_test_module.git"
user_name: lvrfrc87
user_email: lvrfrc87@gmail.com
- name: LOCAL | push on local repo.
git_acp:
path: "~/test_directory/repo"
branch: master
comment: Add file1.
add: [ file1 ]
mode: local
url: /Users/federicoolivieri/test_directory/repo.git
- 项目
标签: