Better names. :)
This commit is contained in:
parent
b221478f35
commit
2951b687ae
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
# Facts that must be gathered by tasks.
|
# Facts that must be gathered after running tasks.
|
||||||
|
|
||||||
- name: Gather | Locate BASH
|
- name: Facts | General | Gather | Locate BASH
|
||||||
shell: which bash
|
shell: which bash
|
||||||
register: bash_exec
|
register: bash_exec
|
@ -2,21 +2,21 @@
|
|||||||
# Define program names per OS for package builtin.
|
# Define program names per OS for package builtin.
|
||||||
# This file is for ALL systems and should not include UI components.
|
# This file is for ALL systems and should not include UI components.
|
||||||
|
|
||||||
- name: Set Pop OS Package Names
|
- name: Facts | Workstation | Package | Pop OS
|
||||||
set_fact:
|
set_fact:
|
||||||
sshfs: sshfs
|
sshfs: sshfs
|
||||||
locate: locate
|
locate: locate
|
||||||
when: ansible_distribution == "Pop!_OS"
|
when: ansible_distribution == "Pop!_OS"
|
||||||
|
|
||||||
|
|
||||||
- name: Set Debian and Ubuntu Package Names
|
- name: Facts | Workstation | Package | Debian and Ubuntu
|
||||||
set_fact:
|
set_fact:
|
||||||
sshfs: sshfs
|
sshfs: sshfs
|
||||||
locate: locate
|
locate: locate
|
||||||
when: ansible_distribution in ("Debian","Ubuntu")
|
when: ansible_distribution in ("Debian","Ubuntu")
|
||||||
|
|
||||||
|
|
||||||
- name: Set FreeBSD Package Names
|
- name: Facts | Workstation | Package | FreeBSD
|
||||||
set_fact:
|
set_fact:
|
||||||
sshfs: fusefs-sshfs
|
sshfs: fusefs-sshfs
|
||||||
locate: htop # This is just a placeholder to prevent errors
|
locate: htop # This is just a placeholder to prevent errors
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
# Define program names per OS for service builtin.
|
# Define program names per OS for service builtin.
|
||||||
|
|
||||||
- name: Set Pop OS Service Names
|
- name: Facts | Workstation | Service | Pop OS
|
||||||
set_fact:
|
set_fact:
|
||||||
cups: cups
|
cups: cups
|
||||||
cups_pattern: cupsd
|
cups_pattern: cupsd
|
||||||
@ -10,7 +10,7 @@
|
|||||||
when: ansible_distribution == "Pop!_OS"
|
when: ansible_distribution == "Pop!_OS"
|
||||||
|
|
||||||
|
|
||||||
- name: Set Debian and Ubuntu Service Names
|
- name: Facts | Workstation | Service | Debian and Ubuntu
|
||||||
set_fact:
|
set_fact:
|
||||||
cups: cups
|
cups: cups
|
||||||
cups_pattern: cupsd
|
cups_pattern: cupsd
|
||||||
@ -19,7 +19,7 @@
|
|||||||
when: ansible_distribution in ("Debian","Ubuntu")
|
when: ansible_distribution in ("Debian","Ubuntu")
|
||||||
|
|
||||||
|
|
||||||
- name: Set FreeBSD Service Names
|
- name: Facts | Workstation | Service | FreeBSD
|
||||||
set_fact:
|
set_fact:
|
||||||
cups: cups
|
cups: cups
|
||||||
cups_pattern: cupsd
|
cups_pattern: cupsd
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
# Define file, folder, and other facts per OS.
|
# Define file, folder, and other facts per OS.
|
||||||
|
|
||||||
- name: Set Pop OS Facts
|
- name: Facts | Workstation | System | Pop OS
|
||||||
set_fact:
|
set_fact:
|
||||||
lynis_install_dir: /usr/local/lynis
|
lynis_install_dir: /usr/local/lynis
|
||||||
lynis_report: /home/ling/lynis.log
|
lynis_report: /home/ling/lynis.log
|
||||||
@ -10,7 +10,7 @@
|
|||||||
when: ansible_distribution == "Pop!_OS"
|
when: ansible_distribution == "Pop!_OS"
|
||||||
|
|
||||||
|
|
||||||
- name: Set Debian and Ubuntu Facts
|
- name: Facts | Workstation | System | Debian and Ubuntu
|
||||||
set_fact:
|
set_fact:
|
||||||
lynis_install_dir: /usr/local/lynis
|
lynis_install_dir: /usr/local/lynis
|
||||||
lynis_report: /root/lynis.log
|
lynis_report: /root/lynis.log
|
||||||
@ -19,7 +19,7 @@
|
|||||||
when: ansible_distribution in ("Debian","Ubuntu")
|
when: ansible_distribution in ("Debian","Ubuntu")
|
||||||
|
|
||||||
|
|
||||||
- name: Set FreeBSD Facts
|
- name: Facts | Workstation | System | FreeBSD
|
||||||
set_fact:
|
set_fact:
|
||||||
lynis_install_dir: /usr/local/lynis
|
lynis_install_dir: /usr/local/lynis
|
||||||
lynis_report: /root/lynis.log
|
lynis_report: /root/lynis.log
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
---
|
---
|
||||||
# Define users and groups per OS type.
|
# Define users and groups per OS type.
|
||||||
|
|
||||||
- name: Set Linux User Variables
|
- name: Facts | Workstation | User | Linux
|
||||||
set_fact:
|
set_fact:
|
||||||
root_group: root
|
root_group: root
|
||||||
when: ansible_system == "Linux"
|
when: ansible_system == "Linux"
|
||||||
|
|
||||||
|
|
||||||
- name: Set FreeBSD User Variables
|
- name: Facts | Workstation | User | FreeBSD
|
||||||
set_fact:
|
set_fact:
|
||||||
root_group: wheel
|
root_group: wheel
|
||||||
when: ansible_system == "FreeBSD"
|
when: ansible_system == "FreeBSD"
|
@ -2,7 +2,7 @@
|
|||||||
# Define program names per OS for package builtin.
|
# Define program names per OS for package builtin.
|
||||||
# This is only for Workstation devices with UIs.
|
# This is only for Workstation devices with UIs.
|
||||||
|
|
||||||
- name: Set Pop OS Package Names
|
- name: Facts | Workstation | Package | Pop OS
|
||||||
set_fact:
|
set_fact:
|
||||||
firefox: firefox
|
firefox: firefox
|
||||||
firefox-esr: firefox-esr
|
firefox-esr: firefox-esr
|
||||||
@ -11,7 +11,7 @@
|
|||||||
when: ansible_distribution == "Pop!_OS"
|
when: ansible_distribution == "Pop!_OS"
|
||||||
|
|
||||||
|
|
||||||
- name: Set Debian and Ubuntu Package Names
|
- name: Facts | Workstation | Package | Debian and Ubuntu
|
||||||
set_fact:
|
set_fact:
|
||||||
firefox: firefox
|
firefox: firefox
|
||||||
firefox-esr: firefox-esr
|
firefox-esr: firefox-esr
|
||||||
@ -20,7 +20,7 @@
|
|||||||
when: ansible_distribution in ("Debian","Ubuntu")
|
when: ansible_distribution in ("Debian","Ubuntu")
|
||||||
|
|
||||||
|
|
||||||
- name: Set FreeBSD Package Names
|
- name: Facts | Workstation | Package | FreeBSD
|
||||||
set_fact:
|
set_fact:
|
||||||
firefox: firefox
|
firefox: firefox
|
||||||
firefox-esr: firefox-esr
|
firefox-esr: firefox-esr
|
||||||
|
@ -1,19 +1,19 @@
|
|||||||
---
|
---
|
||||||
# Define file, folder, and other facts per OS.
|
# Define file, folder, and other facts per OS.
|
||||||
|
|
||||||
- name: Set Pop OS Facts
|
- name: Facts | Workstation | System | Pop OS
|
||||||
set_fact:
|
set_fact:
|
||||||
flatpak_distro: true
|
flatpak_distro: true
|
||||||
when: ansible_distribution == "Pop!_OS"
|
when: ansible_distribution == "Pop!_OS"
|
||||||
|
|
||||||
|
|
||||||
- name: Set Debian and Ubuntu Facts
|
- name: Facts | Workstation | System | Debian and Ubuntu
|
||||||
set_fact:
|
set_fact:
|
||||||
flatpak_distro: true
|
flatpak_distro: true
|
||||||
when: ansible_distribution in ("Debian","Ubuntu")
|
when: ansible_distribution in ("Debian","Ubuntu")
|
||||||
|
|
||||||
|
|
||||||
- name: Set FreeBSD Facts
|
- name: Facts | Workstation | System | FreeBSD
|
||||||
set_fact:
|
set_fact:
|
||||||
flatpak_distro: false
|
flatpak_distro: false
|
||||||
when: ansible_system == "FreeBSD"
|
when: ansible_system == "FreeBSD"
|
@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
# Provide FreeBSD with a DE.
|
# Provide FreeBSD with a DE.
|
||||||
|
|
||||||
- name: FreeBSD | Software | Install UI Components
|
- name: Workstation | FreeBSD | GUI | Install UI Components
|
||||||
package:
|
package:
|
||||||
name:
|
name:
|
||||||
- xorg
|
- xorg
|
||||||
@ -10,14 +10,14 @@
|
|||||||
- "{{ thunderbird }}"
|
- "{{ thunderbird }}"
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: FreeBSD | Software | Uninstall Bloat
|
- name: Workstation | FreeBSD | GUI | Uninstall Bloat
|
||||||
package:
|
package:
|
||||||
name:
|
name:
|
||||||
- "{{ firefox }}"
|
- "{{ firefox }}"
|
||||||
- "{{ evolution }}"
|
- "{{ evolution }}"
|
||||||
state: absent
|
state: absent
|
||||||
|
|
||||||
- name: FreeBSD | Software | Create rc.conf Entries
|
- name: Workstation | FreeBSD | GUI | Create rc.conf Entries
|
||||||
blockinfile:
|
blockinfile:
|
||||||
path: /etc/rc.conf
|
path: /etc/rc.conf
|
||||||
block: |
|
block: |
|
||||||
@ -29,7 +29,7 @@
|
|||||||
fusefs_enable="YES"
|
fusefs_enable="YES"
|
||||||
backup: yes
|
backup: yes
|
||||||
|
|
||||||
- name: FreeBSD | Software | Create fstab Entries
|
- name: Workstation | FreeBSD | GUI | Create fstab Entries
|
||||||
blockinfile:
|
blockinfile:
|
||||||
path: /etc/fstab
|
path: /etc/fstab
|
||||||
block: |
|
block: |
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
# Groups that do not come to all distros by default.
|
# Groups that do not come to all distros by default.
|
||||||
|
|
||||||
- name: Ensure sudo group exists (Looking at you BSD!)
|
- name: General | Account Management | Groups | Sudo (Looking at you BSD!)
|
||||||
group:
|
group:
|
||||||
name: sudo
|
name: sudo
|
||||||
|
@ -6,11 +6,11 @@
|
|||||||
# openssh_keypair:
|
# openssh_keypair:
|
||||||
# path: /root/.ssh/id_rsa
|
# path: /root/.ssh/id_rsa
|
||||||
|
|
||||||
- name: SSH Key | Root | Create
|
- name: General | Account Management | SSH Key | Root | Create
|
||||||
shell: ssh-keygen -t rsa -N '' -f ~/.ssh/id_rsa <<< n
|
shell: ssh-keygen -t rsa -N '' -f ~/.ssh/id_rsa <<< n
|
||||||
args:
|
args:
|
||||||
executable: "{{ bash_exec.stdout }}"
|
executable: "{{ bash_exec.stdout }}"
|
||||||
ignore_errors: yes
|
ignore_errors: yes
|
||||||
|
|
||||||
- name: SSH Key | Root | Copy to 1337
|
- name: General | Account Management | SSH Key | Root | Copy to 1337
|
||||||
shell: ssh-copy-id -i /root/.ssh/id_rsa ling@leet
|
shell: ssh-copy-id -i /root/.ssh/id_rsa ling@leet
|
@ -1,20 +1,20 @@
|
|||||||
---
|
---
|
||||||
# Mount shares that all systems should have.
|
# Mount shares that all systems should have.
|
||||||
|
|
||||||
- name: Mounts | Create 1337 Folder
|
- name: General | Account Management | Mounts | Create 1337 Folder
|
||||||
file:
|
file:
|
||||||
path: /mnt/leet
|
path: /mnt/leet
|
||||||
state: directory
|
state: directory
|
||||||
mode: '0755'
|
mode: '0755'
|
||||||
|
|
||||||
- name: Mounts | Create fstab Entries
|
- name: General | Account Management | Mounts | Create fstab Entries
|
||||||
blockinfile:
|
blockinfile:
|
||||||
path: /etc/fstab
|
path: /etc/fstab
|
||||||
block: |
|
block: |
|
||||||
ling@leet: /mnt/leet fuse.sshfs defaults,_netdev,allow_other,delay_connect 0 0
|
ling@leet: /mnt/leet fuse.sshfs defaults,_netdev,allow_other,delay_connect 0 0
|
||||||
backup: yes
|
backup: yes
|
||||||
|
|
||||||
- name: Mounts | Mount All
|
- name: General | Account Management | Mounts | Mount All
|
||||||
shell: mount -a
|
shell: mount -a
|
||||||
args:
|
args:
|
||||||
warn: false
|
warn: false
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
# Ensure the proper users have sudo access.
|
# Ensure the proper users have sudo access.
|
||||||
|
|
||||||
- name: Add Ansible Sudoers File
|
- name: General | Account Management | Sudo | Copy Ansible
|
||||||
copy:
|
copy:
|
||||||
src: sudoers_ansible
|
src: sudoers_ansible
|
||||||
dest: "{{ sudoers_install_dir }}"
|
dest: "{{ sudoers_install_dir }}"
|
||||||
@ -9,7 +9,7 @@
|
|||||||
group: "{{ root_group }}"
|
group: "{{ root_group }}"
|
||||||
mode: 0440
|
mode: 0440
|
||||||
|
|
||||||
- name: Add Sudo Group Sudoers File
|
- name: General | Account Management | Sudo | Copy Sudo Group
|
||||||
copy:
|
copy:
|
||||||
src: sudoers_sudo
|
src: sudoers_sudo
|
||||||
dest: "{{ sudoers_install_dir }}"
|
dest: "{{ sudoers_install_dir }}"
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
# Create users for both desktop and server machines.
|
# Create users for both desktop and server machines.
|
||||||
|
|
||||||
# Scheduler
|
# Scheduler
|
||||||
- name: Create User Ansible
|
- name: General | Account Management | User | Ansible
|
||||||
user:
|
user:
|
||||||
name: ansible
|
name: ansible
|
||||||
comment: Ansible
|
comment: Ansible
|
||||||
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
|
|
||||||
# Superuser
|
# Superuser
|
||||||
- name: Create User Hyperling
|
- name: General | Account Management | User | Hyperling
|
||||||
user:
|
user:
|
||||||
name: ling
|
name: ling
|
||||||
comment: Hyperling
|
comment: Hyperling
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
- name: install cron job (ansible-pull)
|
- name: General | Cron | Ansible | Create Main Job
|
||||||
cron:
|
cron:
|
||||||
user: ansible
|
user: ansible
|
||||||
name: "Ansible Sync"
|
name: "Ansible Sync"
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
- name: Remove CUPS Daemon
|
- name: General | Software | Harden | Remove CUPS Daemon
|
||||||
service:
|
service:
|
||||||
name: "{{ cups }}"
|
name: "{{ cups }}"
|
||||||
pattern: "{{ cups_pattern }}"
|
pattern: "{{ cups_pattern }}"
|
||||||
state: stopped
|
state: stopped
|
||||||
enabled: no
|
enabled: no
|
||||||
|
|
||||||
- name: Remove CUPS-Browse Daemon
|
- name: General | Software | Harden | Remove CUPS-Browse Daemon
|
||||||
service:
|
service:
|
||||||
name: "{{ cups_browse }}"
|
name: "{{ cups_browse }}"
|
||||||
pattern: "{{ cups_browse_pattern }}"
|
pattern: "{{ cups_browse_pattern }}"
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
---
|
---
|
||||||
# Cross-platform package management.
|
# Cross-platform package management.
|
||||||
|
|
||||||
- name: Repo Cache Refresh (Apt and Pacman)
|
- name: General | Software | Packages | Cache Refresh (Apt and Pacman)
|
||||||
package:
|
package:
|
||||||
update_cache: yes
|
update_cache: yes
|
||||||
when: ansible_pkg_mgr in ["apt", "pacman"]
|
when: ansible_pkg_mgr in ["apt", "pacman"]
|
||||||
|
|
||||||
- name: Repo Cache Refresh (FreeBSD)
|
- name: General | Software | Packages | Cache Refresh (FreeBSD)
|
||||||
shell: pkg update
|
shell: pkg update
|
||||||
when: ansible_system == "FreeBSD"
|
when: ansible_system == "FreeBSD"
|
||||||
|
|
||||||
- name: Repo Install Software
|
- name: General | Software | Packages | Install Software
|
||||||
package:
|
package:
|
||||||
name:
|
name:
|
||||||
- bash
|
- bash
|
||||||
@ -20,7 +20,7 @@
|
|||||||
- "{{ locate }}"
|
- "{{ locate }}"
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: Repo Update Software (Disabled)
|
- name: General | Software | Packages | Update Software (Disabled)
|
||||||
package:
|
package:
|
||||||
name:
|
name:
|
||||||
- ansible
|
- ansible
|
||||||
@ -29,14 +29,14 @@
|
|||||||
state: latest
|
state: latest
|
||||||
when: "1 == 0"
|
when: "1 == 0"
|
||||||
|
|
||||||
- name: Repo Remove Software
|
- name: General | Software | Packages | Remove Software
|
||||||
package:
|
package:
|
||||||
name:
|
name:
|
||||||
- cowsay # Sorry ;)
|
- cowsay # Sorry ;)
|
||||||
state: absent
|
state: absent
|
||||||
|
|
||||||
# TODO: Confirm if Ubuntu still uses snap for critical components like GNOME.
|
# TODO: Confirm if Ubuntu still uses snap for critical components like GNOME.
|
||||||
- name: Repo Remove Software (Besides Ubuntu)
|
- name: General | Software | Packages | Remove Software (Besides Ubuntu)
|
||||||
package:
|
package:
|
||||||
name:
|
name:
|
||||||
- snapd
|
- snapd
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
- name: Install Lynis
|
- name: General | Tests | Lynis | Install
|
||||||
git:
|
git:
|
||||||
repo: https://github.com/CISOfy/lynis
|
repo: https://github.com/CISOfy/lynis
|
||||||
dest: "{{ lynis_install_dir }}"
|
dest: "{{ lynis_install_dir }}"
|
||||||
clone: yes
|
clone: yes
|
||||||
force: yes
|
force: yes
|
||||||
|
|
||||||
- name: Run Lynis Audit System
|
- name: General | Tests | Lynis | Run System Audit
|
||||||
shell: "{{ lynis_install_dir }}/lynis --no-colors audit system > {{ lynis_report }} 2>&1"
|
shell: "{{ lynis_install_dir }}/lynis --no-colors audit system > {{ lynis_report }} 2>&1"
|
||||||
|
|
||||||
- name: Make Lynis Report Readable
|
- name: General | Tests | Lynis | Make Report Readable
|
||||||
file:
|
file:
|
||||||
path: "{{ lynis_report }}"
|
path: "{{ lynis_report }}"
|
||||||
mode: '0444'
|
mode: '0444'
|
@ -1,12 +1,12 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
# Pre-reqs
|
# Pre-reqs
|
||||||
- name: Install Flatpak
|
- name: Workstation | Linux | Flatpak | Install Flatpak
|
||||||
package:
|
package:
|
||||||
name: flatpak
|
name: flatpak
|
||||||
update_cache: yes
|
update_cache: yes
|
||||||
|
|
||||||
- name: Add Flathub for System
|
- name: Workstation | Linux | Flatpak | Add Flathub for System
|
||||||
flatpak_remote:
|
flatpak_remote:
|
||||||
name: flathub
|
name: flathub
|
||||||
state: present
|
state: present
|
||||||
@ -14,24 +14,24 @@
|
|||||||
flatpakrepo_url: https://dl.flathub.org/repo/flathub.flatpakrepo
|
flatpakrepo_url: https://dl.flathub.org/repo/flathub.flatpakrepo
|
||||||
|
|
||||||
# Hop into installs
|
# Hop into installs
|
||||||
- name: Install Discord
|
- name: Workstation | Linux | Flatpak | Install Discord
|
||||||
flatpak:
|
flatpak:
|
||||||
name: com.discordapp.Discord
|
name: com.discordapp.Discord
|
||||||
|
|
||||||
- name: Install Shotcut
|
- name: Workstation | Linux | Flatpak | Install Shotcut
|
||||||
flatpak:
|
flatpak:
|
||||||
name: org.shotcut.Shotcut
|
name: org.shotcut.Shotcut
|
||||||
|
|
||||||
- name: Install Firefox
|
- name: Workstation | Linux | Flatpak | Install Firefox
|
||||||
flatpak:
|
flatpak:
|
||||||
name: org.mozilla.firefox
|
name: org.mozilla.firefox
|
||||||
|
|
||||||
- name: Install Thunderbird
|
- name: Workstation | Linux | Flatpak | Install Thunderbird
|
||||||
flatpak:
|
flatpak:
|
||||||
name: org.mozilla.Thunderbird
|
name: org.mozilla.Thunderbird
|
||||||
|
|
||||||
# Remove any applicable repo software
|
# Remove any applicable repo software
|
||||||
- name: Remove packages that may come with an OS but were just installed as Flatpak
|
- name: Workstation | Linux | Flatpak | Remove Packages
|
||||||
package:
|
package:
|
||||||
name:
|
name:
|
||||||
- "{{ firefox }}"
|
- "{{ firefox }}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user