Commit 8f0f3767 authored by Nick Busey's avatar Nick Busey

Merge branch '7-add-intial-setup-helper-utility' into 'master'

Resolve "Add intial setup helper utility"

Closes #7

See merge request !9
parents 0548300d c2810fea
Pipeline #23810774 passed with stages
in 35 seconds
......@@ -2,16 +2,25 @@
# Deploy HomelabOS
deploy:
cat homelaboslogo.txt
ansible-playbook -i hosts homelabos.yml
# Initial setup
setup:
cat homelaboslogo.txt
ansible-playbook -i setup_hosts setup.yml
# Update just HomelabOS Services (skipping slow initial setup steps)
update:
cat homelaboslogo.txt
ansible-playbook -i hosts -t deploy homelabos.yml
# Build the HomelabOs Documentation - Requires mkdocs with the Material Theme
build:
cat homelaboslogo.txt
mkdocs build
# Restore a server with the most recent backup. Assuming Backups were running.
restore:
cat homelaboslogo.txt
ansible-playbook -i hosts restore.yml
......@@ -4,16 +4,16 @@ Clone the repository if you have git `git clone git@gitlab.com:NickBusey/Homelab
Make sure you have Ansible 2.5+ installed.
Copy `group_vars/homelabos` to `host_vars/myserver` and change the settings to match your setup.
From inside the HomelabOS folder execute the terminal command `make setup` to configure your server settings.
Once you have set at a very minimum the required fields in that file, you can begin the installation.
Once that is done, you can run `make` to have HomelabOS install itself.
Now from inside the HomelabOS folder execute the terminal command `make`.
To configure additional services, look at the options available in `group_vars/homelabos` and override them in `host_vars/myserver`.
You can always change settings and re-run `make` to update the server with these settings.
You can always change settings by hand in `host_vars/myserver` and re-run `make` again to update the server with your new settings.
## Network Configuration
It is recommended to register an actual domain to point at your Homelab, but if you can't or would prefer not to, you can use HomelabOS fully inside your network. Simply make up a domain that ends in `.local` and enter that as your domain in `host_vars/myserver`.
When HomelabOS `make` command completes, it creates a file on the computer which ran make `/tmp/homelabos_hosts`. You can take the contents of this file and create local DNS overrides using it. All your requests should complete as expected.
\ No newline at end of file
When HomelabOS `make` command completes, it creates a file on the computer which ran make `/tmp/homelabos_hosts`. You can take the contents of this file and create local DNS overrides using it. All your requests should complete as expected.
  _   _                              _           _        ___    ____  
 | | | |   ___    _ __ ___     ___  | |   __ _  | |__    / _ \  / ___| 
 | |_| |  / _ \  | '_ ` _ \   / _ \ | |  / _` | | '_ \  | | | | \___ \ 
 |  _  | | (_) | | | | | | | |  __/ | | | (_| | | |_) | | |_| |  ___) |
 |_| |_|  \___/  |_| |_| |_|  \___| |_|  \__,_| |_.__/   \___/  |____/ 
ansible_host: 127.0.0.1
---
- name: Save `host_vars/myserver` config file.
delegate_to: localhost
template: src='myserver' dest='{{ playbook_dir }}/host_vars/myserver'
---
- hosts: all
remote_user: root
gather_facts: False
vars_prompt:
- name: homelab_ip
prompt: "What is the local IP of your server that you can SSH to?"
private: no
- name: homelab_ssh_user
prompt: "What is the user you can passwordless SSH to the above server with?"
private: no
- name: homelab_user
prompt: "What is the default username you would like created as an admin on the various HomelabOS services?"
private: no
- name: homelab_pass
prompt: "What is the default password you would like for this account?"
private: no
- name: homelab_domain
prompt: "What is the domain you have pointed at your Homelab server with ports 80 and 443?"
private: no
roles:
- setup
[homelabos]
localhost
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment