Initial Commit
This commit is contained in:
commit
6944b0b2ad
18
.editorconfig
Normal file
18
.editorconfig
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
# EditorConfig is awesome: https://EditorConfig.org
|
||||||
|
|
||||||
|
# top-most EditorConfig file
|
||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 4
|
||||||
|
end_of_line = lf
|
||||||
|
charset = utf-8
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
insert_final_newline = true
|
||||||
|
|
||||||
|
[*.md]
|
||||||
|
trim_trailing_whitespace = false
|
||||||
|
|
||||||
|
[*.yml]
|
||||||
|
indent_size = 2
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
**/*venv
|
5
.vscode/settings.json
vendored
Normal file
5
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"cSpell.words": [
|
||||||
|
"pibox"
|
||||||
|
]
|
||||||
|
}
|
28
LICENSE.txt
Normal file
28
LICENSE.txt
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
BSD 3-Clause License
|
||||||
|
|
||||||
|
Copyright (c) 2024, Code Fox <c0de@c0de.dev>
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
1. Redistributions of source code must retain the above copyright notice, this
|
||||||
|
list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||||
|
this list of conditions and the following disclaimer in the documentation
|
||||||
|
and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
3. Neither the name of the copyright holder nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived from
|
||||||
|
this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||||
|
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
|
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
|
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||||
|
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||||
|
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
1
ansible/inventories/group_vars/pibox.yml
Normal file
1
ansible/inventories/group_vars/pibox.yml
Normal file
@ -0,0 +1 @@
|
|||||||
|
# Group Vars for pibox devices
|
1
ansible/inventories/host_vars/pibox-01.c0de.online.yml
Normal file
1
ansible/inventories/host_vars/pibox-01.c0de.online.yml
Normal file
@ -0,0 +1 @@
|
|||||||
|
# Host Vars for the first pibox host
|
1
ansible/inventories/host_vars/pibox-02.c0de.online.yml
Normal file
1
ansible/inventories/host_vars/pibox-02.c0de.online.yml
Normal file
@ -0,0 +1 @@
|
|||||||
|
# Host Vars for the second pibox host
|
6
ansible/inventories/inventory.yml
Normal file
6
ansible/inventories/inventory.yml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
pibox:
|
||||||
|
hosts:
|
||||||
|
pibox-01.c0de.online
|
||||||
|
pibox-02.c0de.online
|
||||||
|
vars:
|
||||||
|
ansible_user: c0de
|
20
readme.md
Normal file
20
readme.md
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
# pibox-ansible
|
||||||
|
|
||||||
|
Some ansible playbooks to manage a [pibox](https://pibox.io) in various ways
|
||||||
|
|
||||||
|
## Prerequisites
|
||||||
|
|
||||||
|
1. Internet connection
|
||||||
|
1. Python 3 on Linux (or WSL)
|
||||||
|
1. One or more PiBoxes that you don't want to manage through [KubeSail](https://kubesail.com)
|
||||||
|
|
||||||
|
## Getting Started
|
||||||
|
|
||||||
|
1. Clone this repository: `git clone https://c0de.dev/c0de/pibox-ansible`
|
||||||
|
1. Enter the repo: `cd pibox-ansible`
|
||||||
|
1. Create a python virtual environment: `python3 -m venv .venv`
|
||||||
|
1. Enter the virtual environment: `source .venv/bin/activate`
|
||||||
|
1. (optional) Upgrade PIP: `pip3 install --upgrade pip`
|
||||||
|
1. Install ansible: `pip3 install -r requirements.txt`
|
||||||
|
1. Configure Inventory, host vars and group vars
|
||||||
|
1. You probably don't have my domain name on your network lol
|
10
requirements.txt
Normal file
10
requirements.txt
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
ansible==9.1.0
|
||||||
|
ansible-core==2.16.2
|
||||||
|
cffi==1.16.0
|
||||||
|
cryptography==41.0.7
|
||||||
|
Jinja2==3.1.2
|
||||||
|
MarkupSafe==2.1.3
|
||||||
|
packaging==23.2
|
||||||
|
pycparser==2.21
|
||||||
|
PyYAML==6.0.1
|
||||||
|
resolvelib==1.0.1
|
Loading…
x
Reference in New Issue
Block a user