amtega.git_clone

Amtega git_clone 角色

这是一个用于克隆 Git 仓库的 Ansible 角色。

该角色可以与 amtega.gitlab_fork 角色协调工作,以支持将上游/master 合并到克隆的项目中。有关详细信息,请参见角色变量。

角色变量

此角色的所有默认变量列表可在 defaults/main.yml 中找到。

该角色设置了以下信息:

  • git_clone_branch_name: 一个字符串,表示创建的分支名称(如果随机生成则特别有用)

示例剧本

以下是一个示例剧本:

---
- hosts: localhost
  roles:  
    - amtega.git_clone
  vars:    
    git_clone_repo: https://github.com/ansible/ansible.git
    git_clone_dest: /tmp/ansible

测试

测试基于 molecule 和 docker 容器

cd amtega.git_clone

molecule test --all

许可证

版权 (C) 2022 AMTEGA - 加利西亚自治区政府

该角色为自由软件:您可以在以下条款下重新分发和/或修改它:

GNU 通用公共许可证第 3 版,或(根据您的选择)任何更高版本;或者欧洲联盟公共许可证,版本 1.2 或 - 一旦欧洲委员会批准,随后版本的 EUPL。

该角色的发布目的是希望它能有所帮助,但不提供任何担保;甚至不包括适销性或特定用途适用性的隐含担保。有关更多详细信息,请参见 GNU 通用公共许可证或欧洲联盟公共许可证。

作者信息

  • Juan Antonio Valiño García.
关于项目

Clone a git repository

安装
ansible-galaxy install amtega.git_clone
许可证
gpl-3.0
下载
77
拥有者
Agency for Technological Modernization of Galicia