Add Ansible section
This commit is contained in:
parent
e23e69748e
commit
13a1231b91
2 changed files with 33 additions and 0 deletions
12
ansible/README.md
Normal file
12
ansible/README.md
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
# Ansible Playbooks
|
||||||
|
|
||||||
|
> [!NOTE]
|
||||||
|
> Links to videos and articles about how others have built their home labs, as well as a link to my home lab building series.
|
||||||
|
|
||||||
|
Ansible Playbooks allow us to automate redundant server tasks as code.
|
||||||
|
|
||||||
|
If you're curious about Ansible and how it works, below are some excellent YouTube channels and videos that will give you a better understanding of how to use them.
|
||||||
|
|
||||||
|
- [Automate Everything with Ansible! (Ansible for Beginners)](https://youtu.be/w9eCU4bGgjQ)
|
||||||
|
- [The Fastest Way to run Kubernetes at Home - k3s Ansible Automation - Kubernetes in your HomeLab](https://youtu.be/CbkEWcUZ7zM)
|
||||||
|
- [Ansible 101](https://www.youtube.com/playlist?list=PL2_OBreMn7FqZkvMYt6ATmgC0KAGGJNAN)
|
21
ansible/playbooks/common/auto-mount-nfs.yml
Normal file
21
ansible/playbooks/common/auto-mount-nfs.yml
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
- hosts: localhost
|
||||||
|
vars:
|
||||||
|
nfs_version: 3 # to force nfs version to 3.
|
||||||
|
roles:
|
||||||
|
- role: ome.nfs_mount
|
||||||
|
nfs_share_mounts:
|
||||||
|
- path: /mnt/remote
|
||||||
|
location: nfs.example.org:/data
|
||||||
|
# remove a mount from a server
|
||||||
|
- path: /mnt/remote_old
|
||||||
|
location: nfs.example.org:/data1337
|
||||||
|
state: absent
|
||||||
|
- path: /mnt/readonly
|
||||||
|
location: nfs.example.org:/read-only
|
||||||
|
opts: "{{ nfs_mount_opts }},ro"
|
||||||
|
- path: /mnt/ex_passno
|
||||||
|
location: nfs.example.org:/ex_passno
|
||||||
|
passno: 0
|
||||||
|
- path: /mnt/ex_dump
|
||||||
|
location: nfs.example.org:/ex_dump
|
||||||
|
dump: 0
|
Loading…
Add table
Add a link
Reference in a new issue