suzuki-shunsuke.ghq-module
módulo-ansible-ghq
Gestiona repositorios remotos con motemen/ghq. Aunque esto se distribuye en Ansible Galaxy, no es un rol de Ansible, sino un módulo de Ansible y un complemento de acción.
https://galaxy.ansible.com/suzuki-shunsuke/ghq-module/
Aviso
- Este módulo no soporta el modo de verificación.
Requisitos
- Go
- motemen/ghq
Instalación
Este módulo se distribuye en Ansible Galaxy.
Puedes instalarlo con el comando ansible-galaxy
.
$ ansible-galaxy install suzuki-shunsuke.ghq-module
# playbook.yml
- hosts: default
roles:
# Después de llamar a este módulo, puedes usarlo
- suzuki-shunsuke.ghq-module
Opciones
parámetro | requerido | predeterminado | opciones | comentarios |
---|---|---|---|---|
name | no | La ruta del repositorio | ||
executable | no | La ruta del ejecutable del comando ghq | ||
update | no | no | bool | Si es sí, se agrega la opción -u |
ssh | no | no | bool | Si es sí, se agrega la opción -p |
shallow | no | no | bool | Si es sí, se agrega la opción -shallow |
src | no | La ruta de origen del comando "ghq import" | ||
subcommand | no | get | get | El subcomando del comando "ghq import" |
Ejemplo
# Clonar suzuki-shunsuke/zsh.conf
ghq:
name: suzuki-shunsuke/zsh.conf
# Especificar la ruta del comando ghq
ghq:
name: suzuki-shunsuke/zsh.conf
executable: "{{ansible_env.HOME}}/.go/bin/ghq"
# Actualizar
ghq:
name: suzuki-shunsuke/zsh.conf
update: yes
# A través de ssh
ghq:
name: suzuki-shunsuke/zsh.conf
ssh: yes
# Clonación superficial
ghq:
name: suzuki-shunsuke/zsh.conf
shallow: yes
# Importar desde un archivo
# Se ignoran las líneas vacías y las líneas que comienzan con numeral("#")
ghq:
src: repos.txt
# Importar a través de subcomando
ghq:
subcommand: starred motemen
# El subcomando puede ser una cadena o una lista de cadenas
ghq:
subcommand: ["starred", "motemen"]
Licencia
MIT
Para desarrolladores
Requisitos
- Vagrant
- Ansible
Configurar prueba
$ cd tests
$ ansible-galaxy install -r roles.yml
Prueba en Vagrant Provisioning
$ cd tests
$ vagrant up --provision-with=ansible
$ vagrant up --provision-with=ansible_local
Prueba en localhost
$ ansible-playbook test.yml
Acerca del proyecto
Manage remote repository with the motemen/ghq. This is not an Ansible role but an Ansible Module and Action Plugin.
Instalar
ansible-galaxy install suzuki-shunsuke.ghq-module
Licencia
mit
Descargas
341
Propietario
Platform Engineer / OSS Developer / Go