Skip to content

Commit a4b901c

Browse files
committed
[docs] Add instructions for installing role from GitHub
1 parent fea39ad commit a4b901c

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

README.adoc

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
:role-author: lae
22
:role-name: netbox
33
:role: {role-author}.{role-name}
4+
:role-version: 1.0.7
45
:gh-name: {role-author}/ansible-role-{role-name}
56
:netbox-version: 3.7.3
67
= {role}
@@ -12,10 +13,6 @@ ifdef::env-github[]
1213
:warning-caption: :warning:
1314
endif::[]
1415

15-
ifdef::env-github[]
16-
image:https://img.shields.io/badge/role-{role}-blue?style=for-the-badge[Ansible Galaxy Role,link=https://galaxy.ansible.com/{role-author}/{role-name}]
17-
endif::env-github[]
18-
1916
Deploys and configures https://github.com/netbox-community/netbox[NetBox], an IP address management (IPAM) and data center infrastructure management (DCIM) tool.
2017

2118
This role will deploy NetBox within its own virtualenv either by release tarball or via git using uWSGI as the application server.
@@ -30,13 +27,23 @@ The main differences are:
3027
* Hardens the NetBox/uWSGI service (see `templates/netbox.service.j2`)
3128
* Will hot reload on upgrades and configuration changes
3229
30+
To install this role, add the following to your `requirements.yml`:
31+
32+
[source,yaml,subs="attributes"]
33+
----
34+
---
35+
- name: {role}
36+
src: https://github.com/{gh-name}.git
37+
version: v{role-version}
38+
----
39+
3340
== Quickstart
3441

3542
Provided you have Ansible installed and are using defaults:
3643

3744
[source,bash,subs="attributes"]
3845
----
39-
ansible-galaxy install geerlingguy.postgresql davidwittman.redis {role}
46+
ansible-galaxy install geerlingguy.postgresql davidwittman.redis https://github.com/{gh-name}/archive/refs/tags/v{role-version}.tar.gz,v{role-version},{role}
4047
ansible-galaxy collection install community.postgresql
4148
ansible-playbook -i your.server.fqdn, ~/.ansible/roles/{role}/examples/playbook_single_host_deploy.yml -K
4249
----
@@ -48,7 +55,7 @@ You can also use Vagrant, if you prefer, to bring up NetBox at `localhost:8080`:
4855

4956
[source,bash,subs="attributes"]
5057
----
51-
ansible-galaxy install geerlingguy.postgresql davidwittman.redis {role}
58+
ansible-galaxy install geerlingguy.postgresql davidwittman.redis https://github.com/{gh-name}/archive/refs/tags/v{role-version}.tar.gz,{role}
5259
ansible-galaxy collection install community.postgresql
5360
cd ~/.ansible/roles/{role}/
5461
vagrant up

0 commit comments

Comments
 (0)