Coder Social home page Coder Social logo

suzuki-shunsuke / ansible-ghq-module Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 13 KB

ansible module to clone git repositories with motemen/ghq

Home Page: https://galaxy.ansible.com/suzuki-shunsuke/ghq-module/

License: MIT License

Python 94.43% Ruby 5.57%
ansible ghq ansible-module oss

ansible-ghq-module's Introduction

ansible-ghq-module

Build Status

Manage remote repository with the motemen/ghq. Although this is distributed in the Ansible Galaxy, this is not an Ansible role but an Ansible Module and Action Plugin.

https://galaxy.ansible.com/suzuki-shunsuke/ghq-module/

Notice

  • This module doesn't support the check mode.

Requirements

  • Go
  • motemen/ghq

Install

This module is distributed in the Ansible Galaxy. So you can install this with tha ansible-galaxy command.

$ ansible-galaxy install suzuki-shunsuke.ghq-module
# playbook.yml

- hosts: default
  roles:
  # After you call this module, you can use this
  - suzuki-shunsuke.ghq-module

Options

parameter required default choices comments
name no The repository path
executable no The executable path of ghq command
update no no bool If yes, the -u option is added
ssh no no bool If yes, the -p option is added
shallow no no bool If yes, the -shallow option is added
src no The source path of "ghq import" command
subcommand no get get The subcommand of "ghq import" command

Example

# Clone suzuki-shunsuke/zsh.conf
ghq:
  name: suzuki-shunsuke/zsh.conf

# Specify the path of ghq command
ghq:
  name: suzuki-shunsuke/zsh.conf
  executable: "{{ansible_env.HOME}}/.go/bin/ghq"

# Update
go:
  name: suzuki-shunsuke/zsh.conf
  update: yes

# Via ssh
ghq:
  name: suzuki-shunsuke/zsh.conf
  ssh: yes

# Shallow clone
ghq:
  name: suzuki-shunsuke/zsh.conf
  shallow: yes

# Import from file
# Empty lines and started with sharp("#") lines are ignored
ghq:
  src: repos.txt

# Import via subcommand
ghq:
  subcommand: starred motemen

# Subcommand is either str or list of str
ghq:
  subcommand: ["starred", "motemen"]

Licence

MIT

For developers

Requirements

  • Vagrant
  • Ansible

Setup test

$ cd tests
$ ansible-galaxy install -r roles.yml

Test in Vagrant Provisioning

$ cd tests
$ vagrant up --provision-with=ansible
$ vagrant up --provision-with=ansible_local

Test in localhost

$ ansible-playbook test.yml

ansible-ghq-module's People

Contributors

suzuki-shunsuke avatar

Stargazers

 avatar  avatar

Watchers

 avatar  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.