TIL installing ansible roles from github and other sources
You’re not just limited to installing Ansible roles from Ansible Galaxy, you can use public and private git repos too.
Here I’m installing Oefenweb’s Dropbox role using the git+https
syntax for a publicly accessible git url:
ansible-galaxy install --roles-path ./roles https://github.com/Oefenweb/ansible-dropbox.git
And here, I’m accessing Foo’s private weevils
repository that I have access to (using the git+git
syntax):
ansible-galaxy install --roles-path ./roles git+git://example.com/foo/weevils.git
As well as adding these individually from the commandline, you could add them to a requirements.txt
file which you could then use all the roles to install with ansible-galaxy install -r requirements.yml
.
All links, in order of mention:
- Ansible: https://github.com/ansible/ansible
- Ansible Galaxy: https://galaxy.ansible.com
- Oefenweb’s: https://github.com/Oefenweb/ansible-dropbox
- requirements.txt: https://galaxy.ansible.com/docs/using/installing.html#installing-multiple-roles-from-a-file
Recent posts:
- Patch for aarch64 (aka arm64) openssl 1.0.2 'relocation R_AARCH64_PREL64 against symbol OPENSSL_armcap_P error'
- TIL: the `NO_COLOR` informal standard to suppress ANSI colour escape codes
- Copy the contents of a branch into an existing git branch without merging
- Adding search to a static Jekyll site using pagefind
- asdf, python and automatically enabling virtual envs