suzuki-shunsuke.ghq-module
Moduł ansible-ghq
Zarządzaj zdalnym repozytorium za pomocą motemen/ghq. Chociaż jest dostępny w Ansible Galaxy, to nie jest rola Ansible, lecz moduł i wtyczka akcji Ansible.
https://galaxy.ansible.com/suzuki-shunsuke/ghq-module/
Informacja
- Ten moduł nie obsługuje trybu sprawdzania.
Wymagania
- Go
- motemen/ghq
Instalacja
Ten moduł jest udostępniany w Ansible Galaxy.
Możesz go zainstalować za pomocą komendy ansible-galaxy
.
$ ansible-galaxy install suzuki-shunsuke.ghq-module
# playbook.yml
- hosts: default
roles:
# Po wywołaniu tego modułu, możesz go użyć
- suzuki-shunsuke.ghq-module
Opcje
parametr | wymagane | domyślne | dostępne opcje | komentarze |
---|---|---|---|---|
name | nie | Ścieżka do repozytorium | ||
executable | nie | Ścieżka do polecenia ghq | ||
update | nie | nie | bool | Jeśli tak, dodawany jest opcja -u |
ssh | nie | nie | bool | Jeśli tak, dodawana jest opcja -p |
shallow | nie | nie | bool | Jeśli tak, dodawana jest opcja -shallow |
src | nie | Ścieżka źródłowa dla komendy "ghq import" | ||
subcommand | nie | get | get | Podpolecenie dla komendy "ghq import" |
Przykład
# Klonuj suzuki-shunsuke/zsh.conf
ghq:
name: suzuki-shunsuke/zsh.conf
# Określ ścieżkę do polecenia ghq
ghq:
name: suzuki-shunsuke/zsh.conf
executable: "{{ansible_env.HOME}}/.go/bin/ghq"
# Aktualizacja
ghq:
name: suzuki-shunsuke/zsh.conf
update: yes
# Przez ssh
ghq:
name: suzuki-shunsuke/zsh.conf
ssh: yes
# Płytki klon
ghq:
name: suzuki-shunsuke/zsh.conf
shallow: yes
# Import z pliku
# Puste linie i wiersze zaczynające się od znaku hash ("#") są ignorowane
ghq:
src: repos.txt
# Import przez podpolecenie
ghq:
subcommand: starred motemen
# Podpolecenie może być zarówno stringiem, jak i listą stringów
ghq:
subcommand: ["starred", "motemen"]
Licencja
MIT
Dla programistów
Wymagania
- Vagrant
- Ansible
Ustawienie testów
$ cd tests
$ ansible-galaxy install -r roles.yml
Testowanie w Provisioning Vagranta
$ cd tests
$ vagrant up --provision-with=ansible
$ vagrant up --provision-with=ansible_local
Testowanie na localhost
$ ansible-playbook test.yml
O projekcie
Manage remote repository with the motemen/ghq. This is not an Ansible role but an Ansible Module and Action Plugin.
Zainstaluj
ansible-galaxy install suzuki-shunsuke.ghq-module
Licencja
mit
Pobrania
341
Właściciel
Platform Engineer / OSS Developer / Go