mirror of
https://github.com/funkypenguin/geek-cookbook/
synced 2026-10-30 20:48:21 +00:00
Add markdown linting (without breaking the site this time!)
This commit is contained in:
1 parent
52460b8ead
commit
22293fa93d
131 files changed
+668
-1361
No files matched your search
@@ -16,7 +16,7 @@ Now we'll be creating 3 files..
|
||||
|
||||
Create a new file at `ansible/hosts.your-username` containing a variation on this:
|
||||
|
||||
```
|
||||
```bash
|
||||
[your-username:children]
|
||||
proxmox_servers
|
||||
proxmox_vms
|
||||
@@ -62,11 +62,11 @@ bebop ansible_host=192.168.38.203
|
||||
|
||||
The variables used in the playbook are defined in the `ansible/group_vars/all/main.yml`. **Your** variables are going to be defined in a group_vars file based on your username, so that they're [treated with a higher preference](https://docs.ansible.com/ansible/latest/user_guide/playbooks_variables.html#variable-precedence-where-should-i-put-a-variable) than the default values.
|
||||
|
||||
Create a folder under `ansible/group_vars/<your-username>` to match the group name you inserted in line \#1 of your hosts file, and copy `ansible/group_vars/all/main.yml` into this folder. Any variables found in this file will override any variables specified in `ansible/group_vars/all/main.yml`, but any variables _not_ found in your file will be inherited from `ansible/group_vars/all/main.yml`.
|
||||
Create a folder under `ansible/group_vars/<your-username>` to match the group name you inserted in line \#1 of your hosts file, and copy `ansible/group_vars/all/main.yml` into this folder. Any variables found in this file will override any variables specified in `ansible/group_vars/all/main.yml`, but any variables _not_ found in your file will be inherited from `ansible/group_vars/all/main.yml`.
|
||||
|
||||
To further streamline config, a "empty" dictionary variable named `recipe_config` is configured in `ansible/group_vars/all/main.yml`. In your own vars file (`ansible/group_vars/<your-username>/main.yml`), populate this variable with your own preferred values, copied from `recipe_default_config`. When the playbook runs, your values will be combined with the default values.
|
||||
|
||||
!!! tip "Commit `ansible/group_vars/<your-username>/` to your own repo"
|
||||
!!! tip "Commit `ansible/group_vars/<your-username>/` to your own repo"
|
||||
For extra geek-fu, you could commit the contents of ``ansible/group_vars/<your-username>/` to your own repo, so that you can version/track your own config!
|
||||
|
||||
### Secrets
|
||||
@@ -79,19 +79,19 @@ Enter [Ansible Vault](https://docs.ansible.com/ansible/latest/user_guide/vault.h
|
||||
|
||||
Create a password file, containing a vault password (*just generate one yourself*), and store it _outside_ of the repo:
|
||||
|
||||
```
|
||||
```bash
|
||||
echo mysecretpassword > ~/.ansible/vault-password-geek-cookbook-premix
|
||||
```
|
||||
|
||||
Create an ansible-vault encrypted file in the `group_vars/<your-username>/vault.yml` using this password file:
|
||||
|
||||
```
|
||||
```bash
|
||||
ansible-vault create --vault-id geek-cookbook-premix vars/vault.yml
|
||||
```
|
||||
|
||||
Insert your secret values into this file (*refer to `group_vars/all/01_fake_vault.yml` for placeholders*), using a prefix of `vault_`, like this:
|
||||
|
||||
```
|
||||
```bash
|
||||
vault_proxmox_host_password: mysekritpassword
|
||||
```
|
||||
|
||||
@@ -100,7 +100,7 @@ vault_proxmox_host_password: mysekritpassword
|
||||
The vault file is encrypted using a secret you store outside the repo, and now you can safely check in and version `group_vars/<your-username>/vault.yml` without worrying about exposing secrets in cleartext!
|
||||
|
||||
!!! tip "Editing ansible-vault files with VSCode"
|
||||
If you prefer to edit your vault file using VSCode (*with all its YAML syntax checking*) to nasty-ol' CLI editors, you can set your EDITOR ENV variable by running ` export EDITOR="code --wait"`.
|
||||
If you prefer to edit your vault file using VSCode (*with all its YAML syntax checking*) to nasty-ol' CLI editors, you can set your EDITOR ENV variable by running `export EDITOR="code --wait"`.
|
||||
|
||||
## Serving
|
||||
|
||||
@@ -114,13 +114,13 @@ To run the playbook selectively (i.e., maybe just deploy traefik), add the name
|
||||
|
||||
I.e., to deploy only ceph:
|
||||
|
||||
```
|
||||
```bash
|
||||
ansible-playbook -i hosts.your-username deploy.yml -t ceph
|
||||
```
|
||||
|
||||
To deploy traefik (overlay), traefikv1, and traefik-forward-auth:
|
||||
|
||||
```
|
||||
```bash
|
||||
ansible-playbook -i hosts.your-username deploy.yml -t traefik,traefikv1,traefik-forward-auth
|
||||
```
|
||||
|
||||
@@ -130,7 +130,7 @@ Deploying on full autopilot above installs _a lot_ of stuff (and more is being a
|
||||
|
||||
To deploy the base infrastructure:
|
||||
|
||||
```
|
||||
```bash
|
||||
ansible-playbook -i hosts.your-username deploy.yml -t infrastructure
|
||||
```
|
||||
|
||||
@@ -139,6 +139,3 @@ This will run the playbook up through the `traefik-forward-auth` role and leave
|
||||
### Deploy (with debugging)
|
||||
|
||||
If something went wrong, append `-vv` to your deploy command, for extra-verbose output :thumbsup:
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user