Skip to content
Snippets Groups Projects
Commit 94d4a10e authored by nimrod's avatar nimrod
Browse files

Scaffolding.

- Inventory.
- Config.
- README.
- License.
- gitignore.
- pre-commit.
parent 3b9d5839
No related branches found
No related tags found
No related merge requests found
~*
*~
*.sw[op]
*.py[cod]
.DS_Store
__pycache__/
.vagrant/
vendor/
Thumbs.db
*.retry
.svn/
.sass-cache/
*.log
*.out
*.so
node_modules/
.npm/
nbproject/
*.ipynb
.idea/
*.egg-info/
*.[ao]
.classpath
.cache/
bower_components/
*.class
*.[ewj]ar
secring.*
.*.kate-swp
.swp.*
.directory
.Trash-*
build/
_build/
dist/
.tox/
*.pdf
*.exe
*.dll
*.gz
*.tgz
*.tar
*.rar
*.zip
*.pid
*.lock
*.env
.bundle/
!Pipfile.lock
site.*
mail.*
account.*
---
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.5.0
hooks:
- id: check-added-large-files
- id: check-executables-have-shebangs
- id: check-merge-conflict
- id: check-symlinks
- id: check-yaml
- id: detect-private-key
- id: trailing-whitespace
- repo: https://github.com/adarnimrod/ansible-pre-commit.git
rev: v0.9.0
hooks:
- id: ansible-syntax-check
files: bootstrap\.yaml|router\.yaml
types: [yaml]
- repo: https://github.com/willthames/ansible-lint
rev: v4.3.0a0
hooks:
- id: ansible-lint
- repo: https://github.com/adrienverge/yamllint
rev: v1.21.0
hooks:
- id: yamllint
- repo: https://github.com/amperser/proselint/
rev: 0.10.2
hooks:
- id: proselint
types: [markdown]
MIT License
Copyright (c) 2020 Adar Nimrod
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
# Homelab
> My homelab setup using Ansible.
## Background
I used to maintain quite a few Ansible roles with proper CI and whatnot. But as
time moved on a few things changed. Firstly, my homelab was stable and I
didn't have to manage it. My work changed and I used Ansible less and Docker
more. [Molecule](https://molecule.readthedocs.io/) 2.0 came out and I had to
redo all of the CI setup. Also, I reached the time limit with TravisCI with some
of the more complex roles which casued them to fail although they were
completely working.
With this in mind, this is a new take on my homelab setup. I'm not going to do
CI (more than [pre-commit](pre-commit.com/) checks) for the foreseeable future.
There isn't going to be a dev environment using Vagrant. Also, no reusable
Ansible roles. Lastly, the scope for Ansible is much reduced. I'm going to use
it to manage the OpenBSD router, the OpenWRT access point, the base aspects of
the other hosts. Anything that I can do with Docker and Docker Compose, I'm
going to use that. My point here is to allow me to easily update hosts with
minimal downtime to new releases and to do what I can't do with Docker.
## License
This software is licensed under the MIT license (see `LICENSE.txt`).
## Author Information
Nimrod Adar, [contact me](mailto:nimrod@shore.co.il) or visit my [website](
https://www.shore.co.il/). Patches are welcome via [`git send-email`](
http://git-scm.com/book/en/v2/Git-Commands-Email). The repository is located
at: <https://www.shore.co.il/git/>.
[defaults]
callback_whitelist = profile_tasks, timer
command_warnings = True
deprecation_warnings = True
fact_caching = jsonfile
fact_caching_connection = ~/.ansible/facts
force_handlers = True
interpreter_python = auto
inventory = hosts
gathering = smart
pipelining = True
retry_files_save_path = /tmp/
system_warnings = True
unparsed_is_failed = True
verbosity = 2
[inventory]
enable_plugins = yaml
[privilege_escalation]
become = True
become_user = root
become_ask_pass = False
---
all:
hosts:
ns1:
ansible_host: ns1.shore.co.il
ansible_become_method: doas
ns4:
ansible_host: ns4.shore.co.il
kodi:
ansible_host: kodi.shore.co.il
ea6350:
# We already log in as root.
ansible_become: false
ansible_host: ea6350.shore.co.il
host01:
ansible_host: host01.shore.co.il
vars:
# Force usage of Python3.
ansible_python_interpreter: python3
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment