From c026c3e0faf96645898b78fdc5796d2c7c5047a3 Mon Sep 17 00:00:00 2001 From: SeAndersonT Date: Thu, 27 Feb 2025 11:32:40 -0600 Subject: [PATCH] Reinitializing Git Repo --- LICENSE | 4 +- README.md | 2 +- build_vm/main.yml | 10 + build_vm/tasks/main.yml | 15 + build_vm/templates/vm_template.xml.j2 | 224 ++++++ "configure_machine/\\" | 11 + configure_machine/roles/common/files/.bashrc | 27 + .../roles/common/files/.vim/.netrwhist | 9 + .../common/files/.vim/colors/badwolf.vim | 670 +++++++++++++++++ configure_machine/roles/common/files/vimrc | 31 + configure_machine/roles/common/tasks/main.yml | 98 +++ configure_machine/roles/common/vars/main.yml | 32 + .../roles/install_packages/tasks/main.yml | 27 + .../roles/install_packages/vars/main.yml | 6 + configure_machine/site.yml | 8 + configure_nfs/ansible.cfg | 691 ++++++++++++++++++ .../roles/configure_ttrpg/tasks/main.yml | 9 + .../roles/configure_ttrpg/vars/main.yml | 4 + configure_nfs/site.yml | 5 + configure_symlink/.gitignore | 2 + configure_symlink/index.html.j2 | 1 + configure_symlink/webdir.yml | 47 ++ ee/ansible-navigator.log | 331 +++++++++ ee/ansible-navigator.yml | 164 +++++ ee/ansible.cfg | 678 +++++++++++++++++ ee/context/Containerfile | 31 + ee/context/_build/ansible.cfg | 678 +++++++++++++++++ ee/context/_build/requirements.yml | 5 + ee/execution-environment.yml | 7 + ee/requirements.yml | 5 + install_gitea/ansible.cfg | 691 ++++++++++++++++++ install_gitea/roles/common/tasks/main.yml | 6 + .../roles/configure_network/tasks/main.yml | 5 + .../roles/configure_nfs/tasks/main.yml | 28 + .../roles/configure_nfs/vars/main.yml | 5 + .../roles/install_gitea/tasks/.main.yml.swp | Bin 0 -> 12288 bytes .../roles/install_gitea/tasks/main.yml | 36 + .../roles/install_pgdb/tasks/.main.yml.swp | Bin 0 -> 12288 bytes .../roles/install_pgdb/tasks/main.yml | 30 + install_gitea/site.yml | 10 + inventory | 31 + push_update/main.yml | 14 + replicate_dns/replicate_dns.yml | 26 + restart_vms/main.yml | 23 + restart_vms/tasks/check-connection.yml | 24 + set_motd/main.yml | 30 + set_motd/template/motd | 1 + 47 files changed, 4789 insertions(+), 3 deletions(-) create mode 100644 build_vm/main.yml create mode 100644 build_vm/tasks/main.yml create mode 100644 build_vm/templates/vm_template.xml.j2 create mode 100644 "configure_machine/\\" create mode 100644 configure_machine/roles/common/files/.bashrc create mode 100644 configure_machine/roles/common/files/.vim/.netrwhist create mode 100644 configure_machine/roles/common/files/.vim/colors/badwolf.vim create mode 100644 configure_machine/roles/common/files/vimrc create mode 100644 configure_machine/roles/common/tasks/main.yml create mode 100644 configure_machine/roles/common/vars/main.yml create mode 100644 configure_machine/roles/install_packages/tasks/main.yml create mode 100644 configure_machine/roles/install_packages/vars/main.yml create mode 100644 configure_machine/site.yml create mode 100644 configure_nfs/ansible.cfg create mode 100644 configure_nfs/roles/configure_ttrpg/tasks/main.yml create mode 100644 configure_nfs/roles/configure_ttrpg/vars/main.yml create mode 100644 configure_nfs/site.yml create mode 100644 configure_symlink/.gitignore create mode 100644 configure_symlink/index.html.j2 create mode 100644 configure_symlink/webdir.yml create mode 100644 ee/ansible-navigator.log create mode 100644 ee/ansible-navigator.yml create mode 100644 ee/ansible.cfg create mode 100644 ee/context/Containerfile create mode 100644 ee/context/_build/ansible.cfg create mode 100644 ee/context/_build/requirements.yml create mode 100644 ee/execution-environment.yml create mode 100644 ee/requirements.yml create mode 100644 install_gitea/ansible.cfg create mode 100644 install_gitea/roles/common/tasks/main.yml create mode 100644 install_gitea/roles/configure_network/tasks/main.yml create mode 100644 install_gitea/roles/configure_nfs/tasks/main.yml create mode 100644 install_gitea/roles/configure_nfs/vars/main.yml create mode 100644 install_gitea/roles/install_gitea/tasks/.main.yml.swp create mode 100644 install_gitea/roles/install_gitea/tasks/main.yml create mode 100644 install_gitea/roles/install_pgdb/tasks/.main.yml.swp create mode 100644 install_gitea/roles/install_pgdb/tasks/main.yml create mode 100644 install_gitea/site.yml create mode 100644 inventory create mode 100644 push_update/main.yml create mode 100644 replicate_dns/replicate_dns.yml create mode 100644 restart_vms/main.yml create mode 100644 restart_vms/tasks/check-connection.yml create mode 100644 set_motd/main.yml create mode 100644 set_motd/template/motd diff --git a/LICENSE b/LICENSE index 2c2470b..1de4e99 100644 --- a/LICENSE +++ b/LICENSE @@ -209,7 +209,7 @@ If you develop a new program, and you want it to be of the greatest possible use To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the “copyright” line and a pointer to where the full notice is found. Home_Lab_Automation - Copyright (C) 2025 seandersont + Copyright (C) 2024 seandersont This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. @@ -221,7 +221,7 @@ Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: - Home_Lab_Automation Copyright (C) 2025 seandersont + Home_Lab_Automation Copyright (C) 2024 seandersont This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. diff --git a/README.md b/README.md index 5ad3512..428a517 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,3 @@ # Home_Lab_Automation -Anderson home lab automation scripts for AAP demos \ No newline at end of file +Automation for quickly provisioning various resources for my home lab environment, primarily consisting of Ansible playbooks and roles \ No newline at end of file diff --git a/build_vm/main.yml b/build_vm/main.yml new file mode 100644 index 0000000..ddacc08 --- /dev/null +++ b/build_vm/main.yml @@ -0,0 +1,10 @@ +--- +- name: Define and start new vms + hosts: localhost + vars: + name: name + + tasks: + - name: Define and install vms + import_tasks: tasks/main.yml + diff --git a/build_vm/tasks/main.yml b/build_vm/tasks/main.yml new file mode 100644 index 0000000..fe59572 --- /dev/null +++ b/build_vm/tasks/main.yml @@ -0,0 +1,15 @@ +--- +- name: Create VM from template + virt: + command: define + xml: "{{ lookup('template', 'templates/vm_template.xml.j2') }}" + +- name: Check {{ name }}.qcow2 exists + stat: + path: /home/seandersont/.local/share/libvirt/images/{{ name }}.qcow2 + register: stat_result + +- name: Create {{ name }}.qcow2 + command: qemu-img create -f qcow2 /home/seandersont/.local/share/libvirt/images/{{ name }}.qcow2 40 + when: not stat_result.stat.exists + diff --git a/build_vm/templates/vm_template.xml.j2 b/build_vm/templates/vm_template.xml.j2 new file mode 100644 index 0000000..83af424 --- /dev/null +++ b/build_vm/templates/vm_template.xml.j2 @@ -0,0 +1,224 @@ + + {{ name }} + + + + + + + 8388608 + 7340032 + 2 + + /machine + + + hvm + + + + + + + + + EPYC-IBPB + AMD + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + destroy + restart + destroy + + + + + + /usr/bin/qemu-system-x86_64 + + + + + + +
+ + + + + + +
+ + + +
+ + + +
+ + + + + + + + +
+ + + + + +
+ + + + + +
+ + + + + +
+ + + + + +
+ + + + + +
+ + + + + +
+ + + +
+ + + + + + + + +
+ + + + + + + + + + + + + + + + + +
+ + + + +
+ + + +
+ + + + + + + + + + + + + +
+ +