GithubHelp home page GithubHelp logo

tbasset / ansible-role-deploy-git-repos Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gcoop-libre/ansible-role-deploy-git-repos

0.0 0.0 0.0 17 KB

Ansible role for deploy git repositories on target host

License: GNU General Public License v2.0

ansible-role-deploy-git-repos's Introduction

Deploy git repos

Deploy a list of git repositories on the target host.

The role also can set the permissions of the uploaded files.

Requirements

rsync should be available on the target host.

If you would execute the remote rsync as root (setting deploy_git_repos_become_rsync as yes) or you need to change the permissions of the uploaded files, the remote login user should be granted to execute rsync with sudo.

Role Variables

Available variables are listed below, along with default values (see defaults/main.yml):

deploy_git_repos_temp_directory_mask: /tmp/deploy_git_repos.XXXXXXXXXX

This property sets the mask used to create the local temporal directory where the repository will be cloned.

deploy_git_repos_become_rsync: no

When this property is set to yes, the synchronize task will use sudo rsync as remote rsync command.

deploy_git_repos:
  - name: Test
    repo: [email protected]:gcoop-libre/ansible-role-deploy-git-repos.git
    version: master
    dest: /var/www
    subtree: app
    excludes:
      - .git*
    key_file: ~/.ssh/gitlab_camba
    clean: false
    perms:
      - path: cache
        owner: www-data
        group: www-data
        mode: '0775'
        recurse: false

List of repositories to deploy on the target host. name, repo and dest are mandatory. exclude can be a list of files or patterns to exclude when uploading the cloned repository to the target host.

Enabling clean will delete all the files on dest which are not on the repository. perms is a list of files or directories, which owners and permissions should be modified. subtree is used to deploy only a subtree of the cloned repository (optional). key_file can be used to specify the ssh key to use.

Dependencies

None.

Example Playbook

- hosts: servers
  vars_files:
    - vars/main.yml
  roles:
     - gcoop-libre.deploy-git-repos

Inside vars/main.yml:

deploy_git_repos:
  - name: Test
    repo: https://github.com/gcoop-libre/ansible-role-deploy-git-repos.git
    dest: ~/test
    excludes:
      - .git*

License

GPLv2

Author Information

This role was created in 2016 by gcoop Cooperativa de Software Libre.

ansible-role-deploy-git-repos's People

Contributors

anisse avatar csegarra avatar unrblt avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.