Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add instructions for installing role from GitHub #192

Merged
merged 1 commit into from
Dec 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions README.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
:role-author: lae
:role-name: netbox
:role: {role-author}.{role-name}
:role-version: 1.0.7
:gh-name: {role-author}/ansible-role-{role-name}
:netbox-version: 3.7.3
= {role}
Expand All @@ -12,10 +13,6 @@ ifdef::env-github[]
:warning-caption: :warning:
endif::[]

ifdef::env-github[]
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}]
endif::env-github[]

Deploys and configures https://github.com/netbox-community/netbox[NetBox], an IP address management (IPAM) and data center infrastructure management (DCIM) tool.

This role will deploy NetBox within its own virtualenv either by release tarball or via git using uWSGI as the application server.
Expand All @@ -30,13 +27,23 @@ The main differences are:
* Hardens the NetBox/uWSGI service (see `templates/netbox.service.j2`)
* Will hot reload on upgrades and configuration changes

To install this role, add the following to your `requirements.yml`:

[source,yaml,subs="attributes"]
----
---
- name: {role}
src: https://github.com/{gh-name}.git
version: v{role-version}
----

== Quickstart

Provided you have Ansible installed and are using defaults:

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

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