用于git添加/提交/推送操作的Ansible模块。

git-acp-ansible的Python项目详细描述


git acp ansible公司

git_acp是本地或远程(https/ssh)git repo上git addgit commitgit push和{}操作的Ansible模块。在

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

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java Spring框架服务单元测试   在Java中遍历hashmaps的hashmap以检索字符串值   如何使用CodeQL检查Java注释是否具有特定属性?   java为什么在Spring Boot中访问此资源而不是登录弹出窗口需要始终获得完全身份验证   处理将多集计数转换为列表的过程   java另一个线性布局,没有出现按钮   eclipse Java映像加载未显示在jar中   java Junit类无法加载基本测试类ApplicationContext   java如何在main中使用my getvalues()方法打印列表   java Sonar,S128:切换案例应该以无条件的“中断”语句结束,而不是继续   java从socket读取字符串错误连接重置错误   java使用新数据刷新任意图表饼图   java通过异步运行lambda访问方法参数   java错误的结果一旦我处理try and catch