2020-12-21 04:19:21 -06:00
|
|
|
---
|
|
|
|
# Harmonize my systems rather than doing everything manually. :)
|
2020-12-28 18:37:37 -06:00
|
|
|
|
2021-02-02 21:34:08 -06:00
|
|
|
# Setup of any device connected to this repo.
|
2021-02-02 21:31:45 -06:00
|
|
|
- name: Main | Default Setup
|
2021-07-13 08:13:41 -05:00
|
|
|
hosts: everything
|
2020-12-31 17:52:45 -06:00
|
|
|
connection: local
|
2020-12-28 20:06:41 -06:00
|
|
|
become: true
|
|
|
|
|
2021-04-07 20:46:41 -05:00
|
|
|
tasks:
|
2021-02-01 08:28:12 -06:00
|
|
|
- include: facts/general/system.yml
|
|
|
|
- include: facts/general/package.yml
|
|
|
|
- include: facts/general/service.yml
|
|
|
|
- include: facts/general/user.yml
|
2020-12-28 20:06:41 -06:00
|
|
|
|
2021-02-06 08:08:32 -06:00
|
|
|
- include: tasks/general/start.yml
|
|
|
|
|
2021-02-01 05:03:27 -06:00
|
|
|
- include: tasks/general/software/packages.yml
|
2021-02-03 07:36:51 -06:00
|
|
|
- include: tasks/general/software/services.yml
|
|
|
|
ignore_errors: yes
|
2021-02-02 21:05:46 -06:00
|
|
|
|
|
|
|
- include: facts/general/gather.yml
|
2021-02-01 05:03:27 -06:00
|
|
|
|
|
|
|
- include: tasks/general/acct_mgmt/groups.yml
|
|
|
|
- include: tasks/general/acct_mgmt/users.yml
|
|
|
|
- include: tasks/general/acct_mgmt/sudo.yml
|
2021-02-01 06:52:28 -06:00
|
|
|
- include: tasks/general/acct_mgmt/keys.yml
|
2021-02-01 05:03:27 -06:00
|
|
|
- include: tasks/general/acct_mgmt/mounts.yml
|
|
|
|
|
2021-02-12 07:47:22 -06:00
|
|
|
- include: tasks/general/scripts/root.yml
|
|
|
|
|
2021-02-01 05:03:27 -06:00
|
|
|
- include: tasks/general/cron/ansible.yml
|
2021-02-06 11:02:29 -06:00
|
|
|
|
2021-02-12 07:55:56 -06:00
|
|
|
# TODO Need to refactor. Maybe tasks/general/cron/freebsd.yml
|
|
|
|
- include: tasks/workstation/freebsd/cron/ansible.yml
|
2021-02-06 11:02:29 -06:00
|
|
|
when: ansible_system == "FreeBSD"
|
2020-12-21 05:50:12 -06:00
|
|
|
|
2020-12-28 20:06:41 -06:00
|
|
|
|
2021-02-19 08:00:20 -06:00
|
|
|
|
2021-02-02 21:34:08 -06:00
|
|
|
# Additional setup for systems with GUI.
|
2021-02-02 21:31:45 -06:00
|
|
|
- name: Main | Workstation UI Setup
|
2020-12-31 18:00:53 -06:00
|
|
|
hosts: workstation
|
|
|
|
connection: local
|
2020-12-21 05:44:28 -06:00
|
|
|
become: true
|
2020-12-28 20:06:41 -06:00
|
|
|
|
2021-04-07 20:46:41 -05:00
|
|
|
tasks:
|
2021-04-03 09:18:59 -05:00
|
|
|
- include: facts/general/system.yml
|
2021-02-01 08:28:12 -06:00
|
|
|
- include: facts/workstation/package.yml
|
|
|
|
|
2021-02-03 07:36:51 -06:00
|
|
|
# Set up any systems that do not come with Desktop Environments
|
2021-02-12 07:55:56 -06:00
|
|
|
# TODO Need to refactor. Maybe tasks/workstation/setup_gui/freebsd.yml
|
2021-02-11 07:03:04 -06:00
|
|
|
- include: tasks/workstation/freebsd/software/gui.yml
|
2021-02-03 07:36:51 -06:00
|
|
|
when: ansible_system == "FreeBSD"
|
|
|
|
|
2021-02-07 13:02:00 -06:00
|
|
|
# Additional tasks to configure systems with Desktop Environments
|
2021-02-11 07:03:04 -06:00
|
|
|
- include: tasks/workstation/linux/software/flatpaks.yml
|
2021-02-03 21:21:48 -06:00
|
|
|
when: ansible_system == "Linux" and flatpak_distro
|
2021-02-03 21:29:45 -06:00
|
|
|
|
2021-04-03 09:18:59 -05:00
|
|
|
- include: tasks/workstation/linux/software/debs.yml
|
|
|
|
when: ansible_pkg_mgr == "apt"
|
|
|
|
|
2021-04-10 11:33:19 -05:00
|
|
|
- include: tasks/workstation/linux/software/brave.yml
|
|
|
|
when: ansible_pkg_mgr == "apt"
|
2021-02-07 13:02:00 -06:00
|
|
|
|
2021-02-11 07:03:04 -06:00
|
|
|
- include: tasks/workstation/linux/cron/ansible.yml
|
2021-02-07 13:02:00 -06:00
|
|
|
when: ansible_system == "Linux"
|
2021-02-01 05:03:27 -06:00
|
|
|
|
2021-07-11 11:30:59 -05:00
|
|
|
- include: tasks/workstation/linux/software/gnome.yml
|
|
|
|
when: ansible_system == "Linux"
|
|
|
|
|
2021-04-07 20:46:41 -05:00
|
|
|
- include: tasks/workstation/settings/gnome.yml
|
2021-04-24 20:45:42 -05:00
|
|
|
|
|
|
|
- include: tasks/workstation/settings/nfs.yml
|
2021-04-07 20:46:41 -05:00
|
|
|
|
2020-12-28 20:57:05 -06:00
|
|
|
|
2021-02-19 08:00:20 -06:00
|
|
|
|
2021-02-11 08:05:34 -06:00
|
|
|
# Additional setup for miners!
|
2021-02-11 12:12:52 -06:00
|
|
|
- name: Main | Miner Setup
|
2021-02-11 08:05:34 -06:00
|
|
|
hosts: miner
|
|
|
|
connection: local
|
|
|
|
become: true
|
|
|
|
|
2021-04-07 20:46:41 -05:00
|
|
|
tasks:
|
|
|
|
##### Setup #####
|
2021-02-11 12:41:50 -06:00
|
|
|
- include: tasks/miner/debug.yml
|
2021-02-15 18:42:52 -06:00
|
|
|
|
|
|
|
- include: facts/miner/gather.yml
|
2021-02-15 15:19:11 -06:00
|
|
|
|
2021-02-15 10:23:23 -06:00
|
|
|
- include: tasks/miner/acct_mgmt/users.yml
|
2021-02-11 08:05:34 -06:00
|
|
|
|
2021-02-15 15:26:19 -06:00
|
|
|
- include: facts/miner/system.yml
|
2021-02-15 16:12:20 -06:00
|
|
|
- include: facts/miner/config.yml
|
2021-02-15 15:19:11 -06:00
|
|
|
- include: facts/miner/pool.yml
|
|
|
|
|
2021-04-07 20:46:41 -05:00
|
|
|
##### Installations #####
|
2021-02-11 19:51:17 -06:00
|
|
|
### CPU SECTION ###
|
2021-02-11 20:04:27 -06:00
|
|
|
# Monero #
|
2021-02-14 07:12:05 -06:00
|
|
|
- include: tasks/miner/software/xmr-stak-cpu.yml
|
2021-02-15 14:13:04 -06:00
|
|
|
when: xmr_stak_cpu is defined
|
2021-02-11 08:05:34 -06:00
|
|
|
|
2021-02-11 19:51:17 -06:00
|
|
|
### GPU Section ###
|
|
|
|
## Drivers ##
|
2021-02-11 11:17:22 -06:00
|
|
|
- include: tasks/miner/drivers/amdgpu.yml
|
2021-02-15 14:13:04 -06:00
|
|
|
when: ansible_distribution == "Ubuntu" and amdgpu is defined
|
2021-02-11 08:05:34 -06:00
|
|
|
|
2021-02-11 20:04:27 -06:00
|
|
|
# Ethereum #
|
2021-02-14 07:12:05 -06:00
|
|
|
- include: tasks/miner/software/ethminer.yml
|
2021-02-15 14:13:04 -06:00
|
|
|
when: ethminer is defined
|
2021-02-14 07:12:05 -06:00
|
|
|
|
2021-02-15 14:13:04 -06:00
|
|
|
- include: tasks/miner/software/nanominer.yml
|
|
|
|
when: nanominer is defined
|
2021-02-11 08:05:34 -06:00
|
|
|
|
2021-04-07 20:50:31 -05:00
|
|
|
##### Scheduling #####
|
2021-02-11 08:05:34 -06:00
|
|
|
- include: tasks/miner/cron/ansible.yml
|
2021-02-17 05:12:25 -06:00
|
|
|
- include: tasks/miner/cron/mfn.yml
|
2021-02-11 08:05:34 -06:00
|
|
|
|
|
|
|
|
2021-02-19 08:00:20 -06:00
|
|
|
|
|
|
|
# Easy to deploy server configurations.
|
|
|
|
- name: Main | Server Setup
|
|
|
|
hosts: server
|
|
|
|
connection: local
|
|
|
|
become: true
|
|
|
|
|
|
|
|
tasks:
|
2021-04-07 20:32:12 -05:00
|
|
|
- include: tasks/server/software/onlyoffice.yml
|
2021-02-19 08:00:20 -06:00
|
|
|
when: onlyoffice is defined and ansible_pkg_mgr == "apt"
|
|
|
|
|
2021-04-07 20:32:12 -05:00
|
|
|
- include: tasks/server/software/influxdb1.yml
|
2021-03-20 05:03:19 -05:00
|
|
|
when: influxdb1 is defined and ansible_pkg_mgr == "apt"
|
|
|
|
|
2021-04-07 20:32:12 -05:00
|
|
|
- include: tasks/server/software/influxdb2.yml
|
2021-03-20 05:03:19 -05:00
|
|
|
when: influxdb2 is defined and ansible_pkg_mgr == "apt"
|
|
|
|
|
2021-04-07 20:32:12 -05:00
|
|
|
- include: tasks/server/software/grafana.yml
|
2021-03-14 19:39:18 -05:00
|
|
|
when: grafana is defined and ansible_pkg_mgr == "apt"
|
|
|
|
|
2021-04-10 12:18:09 -05:00
|
|
|
- include: tasks/server/software/certbot.yml
|
|
|
|
when: certbot is defined
|
2021-04-07 20:32:12 -05:00
|
|
|
- include: tasks/server/cron/certbot.yml
|
|
|
|
when: certbot is defined
|
2021-03-16 19:44:55 -05:00
|
|
|
|
2021-07-13 06:21:05 -05:00
|
|
|
- include: tasks/server/software/hugo.yml
|
|
|
|
when: hugo is defined
|
|
|
|
|
2021-02-19 08:00:20 -06:00
|
|
|
|
2021-04-07 20:46:41 -05:00
|
|
|
|
2021-03-20 12:05:18 -05:00
|
|
|
# Provide information for analysis.
|
|
|
|
- name: Main | Reporting
|
2021-07-13 08:15:55 -05:00
|
|
|
hosts: everything
|
2020-12-31 18:00:53 -06:00
|
|
|
connection: local
|
2020-12-28 20:57:05 -06:00
|
|
|
become: true
|
|
|
|
|
|
|
|
tasks:
|
2021-03-20 12:05:18 -05:00
|
|
|
- include: tasks/general/software/telegraf.yml
|
|
|
|
|
2021-02-03 21:29:45 -06:00
|
|
|
- include: tasks/general/tests/nmap.yml
|
2021-02-06 08:08:32 -06:00
|
|
|
- include: tasks/general/tests/lynis.yml
|
|
|
|
|
2021-04-07 20:46:41 -05:00
|
|
|
- include: tasks/general/finish.yml
|