Add initial HUGO support, FreeBSD 13 support, and script for Ansible to hit dev branch. (#4)
* Create HUGO file. * Add HUGO. * Add script for running system against development branch. * Add newline to end of file. * Comment unused blocks. * Add path of site that HUGO should host. * Newlines, comments, and HUGO path. (#2) (#3) * Create HUGO file. * Add HUGO. * Add script for running system against development branch. * Add newline to end of file. * Comment unused blocks. * Add path of site that HUGO should host. * FreeBSD is complaining about certbot not having dict object stdout. This whole playbook is supposed to be skipped though, lol. * FreeBSD 13 is still mad. Ansible 2.11.2, jinja 2.11.2 (same version number??), Python 3.8.10. * Fix root group to be existing variable. FreeBSD uses wheel. * Allow choosing Github branch dynamically. * `branch` needs to be at General level. Testing if this works... * Change other `localhost` to `everything`. * Update FreeBSD status. * Goodbye, Code-OSS on Linux! * Delete a terrible file. * Remove excess tag. * "Fix" SSHFS for FreeBSD. * Variablize FreeBSD's loading of fusefs. * Variablize /etc/rc.conf. Enable FuseFS more properly. * Add beginning ticks. * Add missing playbook. * Enable FreeBSD mount job. * Rearrange items to be more consistent with comment. * It seems FreeBSD removed the `gnome3` metapackage. Use `gnome3-lite` instead. Also add Telegram. * Python is to 3.8 now. * Expand on FreeBSD work. * Expand on FreeBSD work. * Add placeholders for Gitlab. * Add parameter for Gitlab install. * Add Gitlab playbook. * Ensure FreeBSD uses the correct Python install. * Add newline. * Fix NFS for FreeBSD workstations. * Remove unnecessary line, restricted install to Linux in playbook. * Fix mount options for FreeBSD. * Fix mount number, as well as system-specific facts. * Add placeholders for remote viewing. * Add RDP for FreeBSD. * Omg! It works! Add setting enforcement. * Always remove OSS. * Remove hosts from explicit dev testing.
This commit is contained in:
parent
bdf3ffa456
commit
c59e706c17
@ -22,12 +22,11 @@ Still testing, but so far so good!
|
|||||||
100% at some point.
|
100% at some point.
|
||||||
|
|
||||||
## Currently Supported Unix Systems
|
## Currently Supported Unix Systems
|
||||||
### FreeBSD
|
### FreeBSD 12, 13
|
||||||
100% but untested since 12.1.
|
100%, although GUI has not been tested on 13 yet.
|
||||||
Software choices are slightly more limited since not flatpak-enabled.
|
Software choices are slightly more limited since not `flatpak`-enabled and not feeling a `ports` setup.
|
||||||
|
|
||||||
## Waiting To Be Tested
|
## Waiting To Be Tested
|
||||||
### FreeBSD 13
|
|
||||||
### Kali Linux
|
### Kali Linux
|
||||||
### Arch Linux ARM
|
### Arch Linux ARM
|
||||||
Specifically for the Pinephone.
|
Specifically for the Pinephone.
|
||||||
|
@ -30,5 +30,6 @@
|
|||||||
sshfs: fusefs-sshfs
|
sshfs: fusefs-sshfs
|
||||||
locate: htop # Placeholder to prevent errors, locate built into FreeBSD.
|
locate: htop # Placeholder to prevent errors, locate built into FreeBSD.
|
||||||
opensshd: htop # sshd comes installed on FreeBSD
|
opensshd: htop # sshd comes installed on FreeBSD
|
||||||
|
ansible_python_interpreter: "/usr/local/bin/python3.8"
|
||||||
when: ansible_system == "FreeBSD"
|
when: ansible_system == "FreeBSD"
|
||||||
|
|
||||||
|
@ -27,6 +27,12 @@
|
|||||||
when: ansible_distribution == "Archlinux"
|
when: ansible_distribution == "Archlinux"
|
||||||
|
|
||||||
|
|
||||||
#- name: General | Facts | Service | FreeBSD
|
- name: General | Facts | Service | Non-FreeBSD
|
||||||
# set_fact:
|
set_fact:
|
||||||
# when: ansible_system == "FreeBSD"
|
load_fusefs: "echo ''"
|
||||||
|
when: ansible_system != "FreeBSD"
|
||||||
|
|
||||||
|
- name: General | Facts | Service | FreeBSD
|
||||||
|
set_fact:
|
||||||
|
load_fusefs: "kldload fusefs"
|
||||||
|
when: ansible_system == "FreeBSD"
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
- name: General | Facts | System | Linux
|
- name: General | Facts | System | Linux
|
||||||
set_fact:
|
set_fact:
|
||||||
|
rc_conf: /dev/null
|
||||||
lynis_install_dir: /usr/local/lynis
|
lynis_install_dir: /usr/local/lynis
|
||||||
sudoers_install_dir: /etc/sudoers.d/
|
sudoers_install_dir: /etc/sudoers.d/
|
||||||
when: ansible_system == "Linux"
|
when: ansible_system == "Linux"
|
||||||
@ -10,6 +11,7 @@
|
|||||||
|
|
||||||
- name: General | Facts | System | FreeBSD
|
- name: General | Facts | System | FreeBSD
|
||||||
set_fact:
|
set_fact:
|
||||||
|
rc_conf: /etc/rc.conf
|
||||||
lynis_install_dir: /usr/local/lynis
|
lynis_install_dir: /usr/local/lynis
|
||||||
sudoers_install_dir: /usr/local/etc/sudoers.d/
|
sudoers_install_dir: /usr/local/etc/sudoers.d/
|
||||||
when: ansible_system == "FreeBSD"
|
when: ansible_system == "FreeBSD"
|
||||||
@ -67,3 +69,9 @@
|
|||||||
lynis_report_scp: "{{ leet_ssh }}:{{ report_scp_location }}/lynis/{{ lynis_report_name }}"
|
lynis_report_scp: "{{ leet_ssh }}:{{ report_scp_location }}/lynis/{{ lynis_report_name }}"
|
||||||
nmap_report_scp: "{{ leet_ssh }}:{{ report_scp_location }}/nmap/{{ nmap_report_name }}"
|
nmap_report_scp: "{{ leet_ssh }}:{{ report_scp_location }}/nmap/{{ nmap_report_name }}"
|
||||||
when: not leet_drive_details.stat.exists
|
when: not leet_drive_details.stat.exists
|
||||||
|
|
||||||
|
|
||||||
|
- name: General | Facts | System | Ansible Branch
|
||||||
|
set_fact:
|
||||||
|
branch: main
|
||||||
|
when: branch is not defined
|
@ -1,5 +1,10 @@
|
|||||||
---
|
---
|
||||||
# Network related variables.
|
# Network related variables.
|
||||||
|
|
||||||
- name: Facts | Server | System | Not Used Yet
|
#- name: Facts | Server | System | Not Used Yet
|
||||||
|
# set_fact:
|
||||||
|
|
||||||
|
- name: Workstation | Facts | Package | FreeBSD
|
||||||
set_fact:
|
set_fact:
|
||||||
|
ansible_python_interpreter: "/usr/local/bin/python3.8"
|
||||||
|
when: ansible_system == "FreeBSD"
|
||||||
|
@ -73,6 +73,7 @@
|
|||||||
set_fact:
|
set_fact:
|
||||||
flatpak_distro: false
|
flatpak_distro: false
|
||||||
firefox_esr: firefox-esr
|
firefox_esr: firefox-esr
|
||||||
psutil: py37-psutil
|
psutil: py38-psutil
|
||||||
|
ansible_python_interpreter: "/usr/local/bin/python3.8"
|
||||||
when: ansible_system == "FreeBSD"
|
when: ansible_system == "FreeBSD"
|
||||||
|
|
||||||
|
24
hosts
24
hosts
@ -1,20 +1,34 @@
|
|||||||
[everything]
|
[everything]
|
||||||
|
;;;;;;; Available options - all require lowercase values ;;;;;;
|
||||||
|
;
|
||||||
|
; branch : Provide the Github branch that the machine should poll.
|
||||||
|
; Exampel: main, dev
|
||||||
|
;
|
||||||
localhost
|
localhost
|
||||||
|
freeboy branch=dev
|
||||||
|
|
||||||
[workstation]
|
[workstation]
|
||||||
;;;;;;; Available options - all require lowercase values ;;;;;;
|
;;;;;;; Available options - all require lowercase values ;;;;;;
|
||||||
|
;
|
||||||
; coding : Define for installation of code editors (VSCode, PyCharm, Android Studio)
|
; coding : Define for installation of code editors (VSCode, PyCharm, Android Studio)
|
||||||
;
|
;
|
||||||
; editing : Define for installation of Audio/Video editors (Shotcut, Audacity, OBS Stdio, GIMP)
|
; editing : Define for installation of Audio/Video editors (Shotcut, Audacity, OBS Stdio, GIMP)
|
||||||
;
|
;
|
||||||
; gaming : Define for installation of gaming software (Steam, Lutris)
|
; gaming : Define for installation of gaming software (Steam, Lutris)
|
||||||
;
|
;
|
||||||
|
; rdp : Define for installation of gaming software (Steam, Lutris)
|
||||||
|
; CURRENTLY FREEBSD-ONLY
|
||||||
|
;
|
||||||
|
; vnc : Define for installation of gaming software (Steam, Lutris)
|
||||||
|
; NOT IMPLEMENTED YET
|
||||||
|
;
|
||||||
dell-laptop coding=true editing=true
|
dell-laptop coding=true editing=true
|
||||||
usb-workstation
|
usb-workstation
|
||||||
lbry-server-1
|
lbry-server-1
|
||||||
lbry-server-2
|
lbry-server-2
|
||||||
lbry-server-3
|
lbry-server-3
|
||||||
aspire
|
aspire
|
||||||
|
freeboy rdp=true
|
||||||
|
|
||||||
[mobile]
|
[mobile]
|
||||||
pinephone
|
pinephone
|
||||||
@ -72,9 +86,14 @@ x570 amdgpu=true nanominer=true nanominer_gpu=eth nanominer_gpus=0 nanominer_gpu
|
|||||||
; hugo : Set to anything to install HUGO static website generator.
|
; hugo : Set to anything to install HUGO static website generator.
|
||||||
; Example: true
|
; Example: true
|
||||||
;
|
;
|
||||||
|
; gitlab : Set to anything to install Gitlab project management tool.
|
||||||
|
; Example: true
|
||||||
|
; NOT IMPLEMENTED YET
|
||||||
|
;
|
||||||
onlyoffice domain=hyperling.com onlyoffice=true
|
onlyoffice domain=hyperling.com onlyoffice=true
|
||||||
grafana domain=hyperling.com grafana=true influxdb1=true
|
grafana domain=hyperling.com grafana=true influxdb1=true
|
||||||
test
|
test
|
||||||
|
freeboy branch=dev
|
||||||
hyperling certbot=true
|
hyperling certbot=true
|
||||||
hyperling.com certbot=true
|
hyperling.com certbot=true
|
||||||
tmcvideos certbot=true
|
tmcvideos certbot=true
|
||||||
@ -83,5 +102,6 @@ reverse-proxy certbot=true
|
|||||||
nextcloud certbot=true
|
nextcloud certbot=true
|
||||||
wordpress certbot=true
|
wordpress certbot=true
|
||||||
usb-server
|
usb-server
|
||||||
parrotsec-dev-www domain=hyperling.com hugo=true hugo_site_path=/mnt/leet/Code/parrotsec/website
|
parrotsec-dev-www domain=hyperling.com hugo=true hugo_site_path=/mnt/leet/Code/ParrotOS/website
|
||||||
my-parrotsec-dev-www hugo=true domain=hyperling.com hugo_site_path=/mnt/leet/Code/parrotsec/website-hyperling
|
my-parrotsec-dev-www domain=hyperling.com hugo=true hugo_site_path=/mnt/leet/Code/ParrotOS/website-hyperling
|
||||||
|
gitlab domain=hyperling.com gitlab=true certbot=true
|
||||||
|
24
local.yml
24
local.yml
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
# Setup of any device connected to this repo.
|
# Setup of any device connected to this repo.
|
||||||
- name: Main | Default Setup
|
- name: Main | Default Setup
|
||||||
hosts: localhost
|
hosts: everything
|
||||||
connection: local
|
connection: local
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
@ -30,6 +30,7 @@
|
|||||||
- include: tasks/general/scripts/root.yml
|
- include: tasks/general/scripts/root.yml
|
||||||
|
|
||||||
- include: tasks/general/cron/ansible.yml
|
- include: tasks/general/cron/ansible.yml
|
||||||
|
- include: tasks/general/cron/root.yml
|
||||||
|
|
||||||
# TODO Need to refactor. Maybe tasks/general/cron/freebsd.yml
|
# TODO Need to refactor. Maybe tasks/general/cron/freebsd.yml
|
||||||
- include: tasks/workstation/freebsd/cron/ansible.yml
|
- include: tasks/workstation/freebsd/cron/ansible.yml
|
||||||
@ -48,10 +49,14 @@
|
|||||||
- include: facts/workstation/package.yml
|
- include: facts/workstation/package.yml
|
||||||
|
|
||||||
# Set up any systems that do not come with Desktop Environments
|
# Set up any systems that do not come with Desktop Environments
|
||||||
# TODO Need to refactor. Maybe tasks/workstation/setup_gui/freebsd.yml
|
|
||||||
- include: tasks/workstation/freebsd/software/gui.yml
|
- include: tasks/workstation/freebsd/software/gui.yml
|
||||||
when: ansible_system == "FreeBSD"
|
when: ansible_system == "FreeBSD"
|
||||||
|
|
||||||
|
- include: tasks/workstation/linux/software/gnome.yml
|
||||||
|
when: ansible_system == "Linux"
|
||||||
|
|
||||||
|
- include: tasks/workstation/settings/gnome.yml
|
||||||
|
|
||||||
# Additional tasks to configure systems with Desktop Environments
|
# Additional tasks to configure systems with Desktop Environments
|
||||||
- include: tasks/workstation/linux/software/flatpaks.yml
|
- include: tasks/workstation/linux/software/flatpaks.yml
|
||||||
when: ansible_system == "Linux" and flatpak_distro
|
when: ansible_system == "Linux" and flatpak_distro
|
||||||
@ -65,13 +70,13 @@
|
|||||||
- include: tasks/workstation/linux/cron/ansible.yml
|
- include: tasks/workstation/linux/cron/ansible.yml
|
||||||
when: ansible_system == "Linux"
|
when: ansible_system == "Linux"
|
||||||
|
|
||||||
- include: tasks/workstation/linux/software/gnome.yml
|
|
||||||
when: ansible_system == "Linux"
|
|
||||||
|
|
||||||
- include: tasks/workstation/settings/gnome.yml
|
|
||||||
|
|
||||||
- include: tasks/workstation/settings/nfs.yml
|
- include: tasks/workstation/settings/nfs.yml
|
||||||
|
|
||||||
|
- include: tasks/workstation/settings/rdp.yml
|
||||||
|
when: rdp is defined
|
||||||
|
- include: tasks/workstation/settings/vnc.yml
|
||||||
|
when: vnc is defined
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Additional setup for miners!
|
# Additional setup for miners!
|
||||||
@ -143,11 +148,14 @@
|
|||||||
- include: tasks/server/software/hugo.yml
|
- include: tasks/server/software/hugo.yml
|
||||||
when: hugo is defined
|
when: hugo is defined
|
||||||
|
|
||||||
|
- include: tasks/server/software/gitlab.yml
|
||||||
|
when: gitlab is defined
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Provide information for analysis.
|
# Provide information for analysis.
|
||||||
- name: Main | Reporting
|
- name: Main | Reporting
|
||||||
hosts: localhost
|
hosts: everything
|
||||||
connection: local
|
connection: local
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
|
@ -8,6 +8,11 @@
|
|||||||
state: directory
|
state: directory
|
||||||
mode: '0755'
|
mode: '0755'
|
||||||
|
|
||||||
|
- name: General | Account Management | Mounts | Enable SSHFS (FreeBSD)
|
||||||
|
shell: "{{ load_fusefs }}"
|
||||||
|
ignore_errors: yes
|
||||||
|
when: ansible_system == "FreeBSD"
|
||||||
|
|
||||||
- name: General | Account Management | Mounts | Test SSHFS
|
- name: General | Account Management | Mounts | Test SSHFS
|
||||||
shell: "sshfs {{ leet_ssh }}: /mnt/test -o allow_other"
|
shell: "sshfs {{ leet_ssh }}: /mnt/test -o allow_other"
|
||||||
register: sshfs_test
|
register: sshfs_test
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
user: ansible
|
user: ansible
|
||||||
name: "Ansible Sync"
|
name: "Ansible Sync"
|
||||||
minute: "*/15"
|
minute: "*/15"
|
||||||
job: "sudo {{ ansible_pull_exec.stdout }} -o -U https://github.com/Hyperling/ansible.git --checkout main"
|
job: "sudo {{ ansible_pull_exec.stdout }} -o -U https://github.com/Hyperling/ansible.git --checkout {{ branch }}"
|
||||||
state: present
|
state: present
|
||||||
disabled: no
|
disabled: no
|
||||||
|
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
user: root
|
user: root
|
||||||
name: "1337 SSHFS"
|
name: "1337 SSHFS"
|
||||||
special_time: reboot
|
special_time: reboot
|
||||||
job: "{{ sshfs_leet_cmd }}"
|
job: "{{ load_fusefs }} && {{ sshfs_leet_cmd }}"
|
||||||
state: absent
|
state: present
|
||||||
disabled: no
|
disabled: no
|
||||||
when: ansible_system == "FreeBSD"
|
when: ansible_system == "FreeBSD"
|
||||||
|
|
||||||
|
@ -13,7 +13,17 @@
|
|||||||
|
|
||||||
## SSHFS ##
|
## SSHFS ##
|
||||||
|
|
||||||
- name: General | Software | Services | Enable SSHD (Linux?)
|
- name: General | Software | Services | Enable FuseFS (FreeBSD rc.conf)
|
||||||
|
lineinfile:
|
||||||
|
path: "{{ rc_conf }}"
|
||||||
|
regexp: 'fusefs_enable='
|
||||||
|
line: 'fusefs_enable="YES" # MANAGED BY ANSIBLE'
|
||||||
|
state: present
|
||||||
|
create: yes
|
||||||
|
backup: yes
|
||||||
|
when: ansible_system == "FreeBSD"
|
||||||
|
|
||||||
|
- name: General | Software | Services | Enable SSHFS (FreeBSD service)
|
||||||
service:
|
service:
|
||||||
name: fusefs
|
name: fusefs
|
||||||
pattern: fusefs
|
pattern: fusefs
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
state: directory
|
state: directory
|
||||||
mode: '0644'
|
mode: '0644'
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: "{{ root_group }}"
|
||||||
recurse: yes
|
recurse: yes
|
||||||
|
|
||||||
- name: General | Tests | Lynis | Ensure Permissions 2
|
- name: General | Tests | Lynis | Ensure Permissions 2
|
||||||
|
@ -1,38 +0,0 @@
|
|||||||
---
|
|
||||||
# DB for analytics, used for Grafana.
|
|
||||||
|
|
||||||
# Installing from source seems a bit too complicated since `make` and `make build` isn't working
|
|
||||||
# Try this: https://devopscube.com/install-configure-prometheus-linux/
|
|
||||||
# Release: https://github.com/prometheus/prometheus/releases/download/v2.25.1/prometheus-2.25.1.linux-amd64.tar.gz
|
|
||||||
# Client?: https://prometheus.io/docs/guides/node-exporter/
|
|
||||||
|
|
||||||
## Variables ##
|
|
||||||
|
|
||||||
#- name: Server | Prometheus | Variables
|
|
||||||
# set_facts:
|
|
||||||
# prom_path: /usr/local/prometheus
|
|
||||||
|
|
||||||
## Pre-reqs ##
|
|
||||||
|
|
||||||
#- name: Server | Prometheus | Pre-Requirements | Install
|
|
||||||
# package:
|
|
||||||
# name:
|
|
||||||
# - make
|
|
||||||
# - golang-go
|
|
||||||
# - nodejs
|
|
||||||
# - yarn
|
|
||||||
# state: present
|
|
||||||
|
|
||||||
#- name: Server | Prometheus | Pre-Requirements | Path
|
|
||||||
# shell: '{{ item }}'
|
|
||||||
# loop:
|
|
||||||
# - mkdir -p {{ prom_path }}
|
|
||||||
|
|
||||||
## Install ##
|
|
||||||
|
|
||||||
#- name: Server | Prometheus | Install
|
|
||||||
# shell: "{{ item }}"
|
|
||||||
# loop:
|
|
||||||
# -
|
|
||||||
|
|
||||||
## Configure ##
|
|
@ -13,3 +13,4 @@
|
|||||||
special_time: weekly
|
special_time: weekly
|
||||||
state: present
|
state: present
|
||||||
disabled: no
|
disabled: no
|
||||||
|
when: certbot is defined and certbot.stdout is defined
|
@ -4,8 +4,8 @@
|
|||||||
- name: Server | Software | Certbot | FreeBSD
|
- name: Server | Software | Certbot | FreeBSD
|
||||||
package:
|
package:
|
||||||
name:
|
name:
|
||||||
- py37-certbot
|
- py38-certbot
|
||||||
- py37-certbot-nginx
|
- py38-certbot-nginx
|
||||||
state: present
|
state: present
|
||||||
when: ansible_system == "FreeBSD"
|
when: ansible_system == "FreeBSD"
|
||||||
|
|
||||||
|
3
tasks/server/software/gitlab.yml
Normal file
3
tasks/server/software/gitlab.yml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
# Install a Gitlab server.
|
||||||
|
# https://about.gitlab.com/install/#ubuntu
|
@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
# Install HUGO to host sites like parrotsec.org
|
# Install HUGO to host sites like parrotsec.org
|
||||||
|
|
||||||
- name: Server | Software | HUGO | Variables (apt)
|
- name: Server | Software | HUGO | Variables (apt)
|
||||||
|
@ -5,11 +5,12 @@
|
|||||||
package:
|
package:
|
||||||
name:
|
name:
|
||||||
- xorg
|
- xorg
|
||||||
- gnome3
|
- gnome3-lite
|
||||||
- "{{ firefox_esr }}"
|
- "{{ firefox_esr }}"
|
||||||
- "{{ thunderbird }}"
|
- "{{ thunderbird }}"
|
||||||
- vscode
|
- vscode
|
||||||
- gimp
|
- gimp
|
||||||
|
- telegram-desktop
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: Workstation | FreeBSD | GUI | Uninstall Bloat
|
- name: Workstation | FreeBSD | GUI | Uninstall Bloat
|
||||||
@ -21,13 +22,14 @@
|
|||||||
|
|
||||||
- name: Workstation | FreeBSD | GUI | Create rc.conf Entries
|
- name: Workstation | FreeBSD | GUI | Create rc.conf Entries
|
||||||
blockinfile:
|
blockinfile:
|
||||||
path: /etc/rc.conf
|
path: "{{ rc_conf }}"
|
||||||
marker: "# {mark} MANAGED BY ANSIBLE | GUI Components"
|
marker: "# {mark} MANAGED BY ANSIBLE | GUI Components"
|
||||||
block: |
|
block: |
|
||||||
dbus_enable="YES"
|
dbus_enable="YES"
|
||||||
hald_enable="YES"
|
hald_enable="YES"
|
||||||
gnome_enable="YES"
|
gnome_enable="YES"
|
||||||
gdm_enable="YES"
|
gdm_enable="YES"
|
||||||
|
create: yes
|
||||||
backup: yes
|
backup: yes
|
||||||
|
|
||||||
- name: Workstation | FreeBSD | GUI | Create proc fstab Entry
|
- name: Workstation | FreeBSD | GUI | Create proc fstab Entry
|
||||||
|
@ -37,7 +37,6 @@
|
|||||||
remote: flathub
|
remote: flathub
|
||||||
state: present
|
state: present
|
||||||
loop:
|
loop:
|
||||||
- com.visualstudio.code-oss
|
|
||||||
- com.vscodium.codium
|
- com.vscodium.codium
|
||||||
- com.google.AndroidStudio
|
- com.google.AndroidStudio
|
||||||
- com.jetbrains.PyCharm-Community
|
- com.jetbrains.PyCharm-Community
|
||||||
@ -50,14 +49,13 @@
|
|||||||
remote: flathub
|
remote: flathub
|
||||||
state: absent
|
state: absent
|
||||||
loop:
|
loop:
|
||||||
- com.visualstudio.code-oss
|
|
||||||
- com.vscodium.codium
|
- com.vscodium.codium
|
||||||
- com.google.AndroidStudio
|
- com.google.AndroidStudio
|
||||||
- com.jetbrains.PyCharm-Community
|
- com.jetbrains.PyCharm-Community
|
||||||
ignore_errors: yes
|
ignore_errors: yes
|
||||||
when: coding is not defined
|
when: coding is not defined
|
||||||
|
|
||||||
# Editor #
|
# Media Editors #
|
||||||
- name: Workstation | Linux | Flatpak Distro | Flatpak | Audio/Video Editor Installs
|
- name: Workstation | Linux | Flatpak Distro | Flatpak | Audio/Video Editor Installs
|
||||||
flatpak:
|
flatpak:
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
@ -84,7 +82,7 @@
|
|||||||
ignore_errors: yes
|
ignore_errors: yes
|
||||||
when: editing is not defined
|
when: editing is not defined
|
||||||
|
|
||||||
# Games #
|
# Gaming #
|
||||||
- name: Workstation | Linux | Flatpak Distro | Flatpak | Gaming Installs
|
- name: Workstation | Linux | Flatpak Distro | Flatpak | Gaming Installs
|
||||||
flatpak:
|
flatpak:
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
@ -114,6 +112,7 @@
|
|||||||
loop:
|
loop:
|
||||||
- org.mozilla.firefox
|
- org.mozilla.firefox
|
||||||
- com.visualstudio.code # Why does this throw an error? It's the correct ID.
|
- com.visualstudio.code # Why does this throw an error? It's the correct ID.
|
||||||
|
- com.visualstudio.code-oss
|
||||||
- org.midori_browser.Midori
|
- org.midori_browser.Midori
|
||||||
- com.github.Eloston.UngoogledChromium
|
- com.github.Eloston.UngoogledChromium
|
||||||
ignore_errors: yes
|
ignore_errors: yes
|
||||||
|
@ -128,7 +128,7 @@
|
|||||||
key: /org/gnome/shell/favorite-apps
|
key: /org/gnome/shell/favorite-apps
|
||||||
value: "['org.gnome.Terminal.desktop', 'gnome-system-monitor.desktop', 'org.gnome.Nautilus.desktop',
|
value: "['org.gnome.Terminal.desktop', 'gnome-system-monitor.desktop', 'org.gnome.Nautilus.desktop',
|
||||||
'{{ browser }}', 'org.mozilla.Thunderbird.desktop',
|
'{{ browser }}', 'org.mozilla.Thunderbird.desktop',
|
||||||
'com.vscodium.codium.desktop', 'com.visualstudio.code-oss.desktop',
|
'com.vscodium.codium.desktop',
|
||||||
'org.shotcut.Shotcut.desktop',
|
'org.shotcut.Shotcut.desktop',
|
||||||
'org.telegram.desktop.desktop', 'com.discordapp.Discord.desktop',
|
'org.telegram.desktop.desktop', 'com.discordapp.Discord.desktop',
|
||||||
'rhythmbox.desktop', 'io.lbry.lbry-app.desktop',
|
'rhythmbox.desktop', 'io.lbry.lbry-app.desktop',
|
||||||
|
@ -1,15 +1,48 @@
|
|||||||
---
|
---
|
||||||
# Use Apt specific because they're consistent! :)
|
# Mount network shares.
|
||||||
|
|
||||||
- name: Workstation | Settings | NFS | Facts
|
- name: Workstation | Settings | NFS | Facts
|
||||||
set_fact:
|
set_fact:
|
||||||
media_folder: /mnt/media
|
media_folder: /mnt/media
|
||||||
|
mount_number: 0
|
||||||
|
|
||||||
- name: Workstation | Settings | NFS | Install
|
- name: Workstation | Settings | NFS | Facts (Linux)
|
||||||
|
set_fact:
|
||||||
|
mount_options: defaults
|
||||||
|
when: ansible_system == "Linux"
|
||||||
|
|
||||||
|
- name: Workstation | Settings | NFS | Facts (FreeBSD)
|
||||||
|
set_fact:
|
||||||
|
mount_options: rw
|
||||||
|
when: ansible_system == "FreeBSD"
|
||||||
|
|
||||||
|
|
||||||
|
- name: Workstation | Settings | NFS | Install (Linux)
|
||||||
package:
|
package:
|
||||||
name:
|
name:
|
||||||
- "{{ nfs }}"
|
- "{{ nfs }}"
|
||||||
state: present
|
state: present
|
||||||
|
when: ansible_system == "Linux"
|
||||||
|
|
||||||
|
# https://www.unixmen.com/setup-nfs-server-on-freebsd/
|
||||||
|
- name: Workstation | Settings | NFS | Install (FreeBSD)
|
||||||
|
blockinfile:
|
||||||
|
path: "{{ rc_conf }}"
|
||||||
|
marker: "# {mark} MANAGED BY ANSIBLE | NFS Components"
|
||||||
|
block: |
|
||||||
|
nfs_server_enable="YES"
|
||||||
|
nfs_server_flags="-u -t -n 4"
|
||||||
|
rpcbind_enable="YES"
|
||||||
|
mountd_flags="-r"
|
||||||
|
mountd_enable="YES"
|
||||||
|
nfs_client_enable="YES"
|
||||||
|
nfs_client_flags="-n 4"
|
||||||
|
rpc_lockd_enable="YES"
|
||||||
|
rpc_statd_enable="YES"
|
||||||
|
create: yes
|
||||||
|
backup: yes
|
||||||
|
when: ansible_system == "FreeBSD"
|
||||||
|
|
||||||
|
|
||||||
- name: Workstation | Settings | NFS | Create Folders
|
- name: Workstation | Settings | NFS | Create Folders
|
||||||
file:
|
file:
|
||||||
@ -19,10 +52,11 @@
|
|||||||
loop:
|
loop:
|
||||||
- "{{ media_folder }}"
|
- "{{ media_folder }}"
|
||||||
|
|
||||||
|
|
||||||
- name: Workstation | Settings | NFS | Create Mount Instructions
|
- name: Workstation | Settings | NFS | Create Mount Instructions
|
||||||
blockinfile:
|
blockinfile:
|
||||||
path: /etc/fstab
|
path: /etc/fstab
|
||||||
marker: "# {mark} MANAGED BY ANSIBLE | Media"
|
marker: "# {mark} MANAGED BY ANSIBLE | Media"
|
||||||
block: |
|
block: |
|
||||||
htpc:/mnt/hdd_unsafe/media {{ media_folder }} nfs defaults 0 0
|
htpc:/mnt/hdd_unsafe/media {{ media_folder }} nfs {{ mount_options }} {{ mount_number }} {{ mount_number }}
|
||||||
backup: yes
|
backup: yes
|
40
tasks/workstation/settings/rdp.yml
Normal file
40
tasks/workstation/settings/rdp.yml
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
---
|
||||||
|
# Allow remote viewing via open/free RDP.
|
||||||
|
|
||||||
|
- name: Workstation | Settings | RDP | FreeBSD | Install
|
||||||
|
package:
|
||||||
|
name: xrdp
|
||||||
|
state: present
|
||||||
|
when: ansible_system == "FreeBSD"
|
||||||
|
|
||||||
|
- name: Workstation | Settings | RDP | FreeBSD | Enable
|
||||||
|
blockinfile:
|
||||||
|
path: "{{ rc_conf }}"
|
||||||
|
marker: "# {mark} MANAGED BY ANSIBLE | RDP Components"
|
||||||
|
block: |
|
||||||
|
xrdp_enable="YES"
|
||||||
|
xrdp_sesman_enable="YES"
|
||||||
|
state: present
|
||||||
|
create: yes
|
||||||
|
backup: yes
|
||||||
|
when: ansible_system == "FreeBSD"
|
||||||
|
|
||||||
|
- name: Workstation | Settings | RDP | FreeBSD | Enable GNOME
|
||||||
|
lineinfile:
|
||||||
|
path: /usr/local/etc/xrdp/startwm.sh
|
||||||
|
regexp: 'gnome-session'
|
||||||
|
line: 'exec gnome-session # MANAGED BY ANSIBLE'
|
||||||
|
state: present
|
||||||
|
create: yes
|
||||||
|
backup: yes
|
||||||
|
when: ansible_system == "FreeBSD"
|
||||||
|
|
||||||
|
- name: Workstation | Settings | RDP | FreeBSD | Disable xterm
|
||||||
|
lineinfile:
|
||||||
|
path: /usr/local/etc/xrdp/startwm.sh
|
||||||
|
regexp: 'xterm'
|
||||||
|
line: '#exec xterm # MANAGED BY ANSIBLE'
|
||||||
|
state: present
|
||||||
|
create: yes
|
||||||
|
backup: yes
|
||||||
|
when: ansible_system == "FreeBSD"
|
2
tasks/workstation/settings/vnc.yml
Normal file
2
tasks/workstation/settings/vnc.yml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
---
|
||||||
|
# Allow remote viewing desktops via VNC.
|
Loading…
x
Reference in New Issue
Block a user