-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
12 changed files
with
83 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
# Based on ansible-lint config | ||
extends: default | ||
|
||
rules: | ||
braces: {max-spaces-inside: 1, level: error} | ||
brackets: {max-spaces-inside: 1, level: error} | ||
colons: {max-spaces-after: -1, level: error} | ||
commas: {max-spaces-after: -1, level: error} | ||
comments: disable | ||
comments-indentation: disable | ||
document-start: disable | ||
empty-lines: {max: 3, level: error} | ||
hyphens: {level: error} | ||
indentation: disable | ||
key-duplicates: enable | ||
line-length: disable | ||
new-line-at-end-of-file: disable | ||
new-lines: {type: unix} | ||
trailing-spaces: disable | ||
truthy: disable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,31 @@ | ||
# Ansible Collection - derekmurawsky.general | ||
|
||
This collection contains some roles and playbooks that I use to set up and maintain my homelab. | ||
[![CI](https://github.com/derekmurawsky/ansible-derekmurawsky-general/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/derekmurawsky/ansible-derekmurawsky-general/actions/workflows/ci.yml) | ||
|
||
## Documentation | ||
This collection contains some roles and playbooks that I use to set up and maintain my homelab. It is published to the [Ansible Galaxy](https://galaxy.ansible.com/derekmurawsky/general). More detailed documentation is available on the project's [github page](https://derekmurawsky.github.io/ansible-derekmurawsky-general/). | ||
|
||
Documentation is available at [https://derekmurawsky.github.io/ansible-derekmurawsky-general/](https://derekmurawsky.github.io/ansible-derekmurawsky-general/). | ||
## Playbooks | ||
|
||
This collection is documented using [MKDocs](https://www.mkdocs.org/) with the [Material](https://squidfunk.github.io/mkdocs-material/) theme and the [MKDocs Monorepo](https://github.com/backstage/mkdocs-monorepo-plugin) plugin. | ||
All playbooks in this bundle target all hosts by default. You can target specific hosts by passing `-e 'target=hostname-or-group'` on the command line to override this behavior. | ||
|
||
## Development | ||
### Bootstrap | ||
|
||
The easiest way to work with this project is to git clone it and then open it with VSCode. This is a devcontainer enabled repo. Once the devcontainer is built once, it will run much faster in the future. | ||
A *very* simple playbook that will use the collections bootstrap role to bootstrap all targeted hosts for ansible management. | ||
|
||
### To build and test locally | ||
### Proxmox | ||
|
||
1. Create a `requirements.yml` that points to this module's directory. | ||
A simple playbook that will apply the proxmox roles from this collection to all targeted hosts. | ||
|
||
```yaml | ||
--- | ||
collections: | ||
- source: derekmurawsky/general | ||
type: dir | ||
``` | ||
## Roles | ||
|
||
2. Install the collection by running the command `ansible-galaxy collection install -r requirements.yml --force`. | ||
3. Any time you make a change to the code that you want to test, you must re-run the command from step 2 | ||
### ansible_bootstrap | ||
|
||
<!-- markdownlint-disable-file MD029 --> | ||
A role to help bootstrap a linux server for ansible management. It provisions a user, adds the user to the sudoers group, and configures password-less sudo for that user. | ||
|
||
### proxmox_base | ||
|
||
A role that does some baseline configuration on a proxmox server. It adds the pve-no-subscription repo, updates the cache, and puts vmbr0 vlan-aware. | ||
|
||
### proxmox_nginx | ||
|
||
A role that configures nginx as a reverse proxy on the proxmox server. It installs and configures nginx as a reverse proxy pointing to the proxmox server behind it. It utilizes ProxMox's default certificates. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
--- | ||
requires_ansible: ">=2.1" | ||
requires_ansible: ">=2.10" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,10 @@ | ||
--- | ||
galaxy_info: | ||
author: Derek Murawsky | ||
description: A simple, yet flexible, role to bootstrap a server for ansible management | ||
|
||
# If the issue tracker for your role is not on github, uncomment the | ||
# next line and provide a value | ||
# issue_tracker_url: http://example.com/issue/tracker | ||
|
||
# Choose a valid license ID from https://spdx.org - some suggested licenses: | ||
# - BSD-3-Clause (default) | ||
# - MIT | ||
# - GPL-2.0-or-later | ||
# - GPL-3.0-only | ||
# - Apache-2.0 | ||
# - CC-BY-4.0 | ||
license: MIT | ||
|
||
min_ansible_version: 2.1 | ||
|
||
# If this a Container Enabled role, provide the minimum Ansible Container version. | ||
# min_ansible_container_version: | ||
|
||
# | ||
# Provide a list of supported platforms, and for each platform a list of versions. | ||
# If you don't wish to enumerate all versions for a particular platform, use 'all'. | ||
# To view available platforms and versions (or releases), visit: | ||
# https://galaxy.ansible.com/api/v1/platforms/ | ||
# | ||
platforms: | ||
- name: Debian | ||
|
||
galaxy_tags: [] | ||
# List tags for your role here, one per line. A tag is a keyword that describes | ||
# and categorizes the role. Users find roles by searching for tags. Be sure to | ||
# remove the '[]' above, if you add tags to this list. | ||
# | ||
# NOTE: A tag is limited to a single word comprised of alphanumeric characters. | ||
# Maximum 20 tags per role. | ||
|
||
dependencies: [] | ||
# List your role dependencies here, one per line. Be sure to remove the '[]' above, | ||
# if you add dependencies to this list. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
--- | ||
site_name: "DerekMurawsky.General - ansible_bootstrap role" | ||
theme: material | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
--- | ||
galaxy_info: | ||
author: Derek Murawsky | ||
description: Basic proxmox bootstrap role | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
--- | ||
galaxy_info: | ||
author: Derek Murawsky | ||
description: Configures NGINX as a frontend for Proxmox | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
--- | ||
site_name: "DerekMurawsky.General - proxmox_nginx role" | ||
theme: material | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters