diff --git a/local.yml b/local.yml index d22ff41..4e07739 100644 --- a/local.yml +++ b/local.yml @@ -14,12 +14,16 @@ - include: facts/user.yml tasks: - - include: tasks/general/packages.yml - - include: tasks/general/groups.yml - - include: tasks/general/users.yml - - include: tasks/general/cron.yml - - include: tasks/general/sudo.yml - - include: tasks/general/harden.yml + - include: tasks/general/software/packages.yml + - include: tasks/general/software/harden.yml + + - include: tasks/general/acct_mgmt/groups.yml + - include: tasks/general/acct_mgmt/users.yml + - include: tasks/general/acct_mgmt/sudo.yml + - include: tasks/general/acct_mgmt/keys.yml + - include: tasks/general/acct_mgmt/mounts.yml + + - include: tasks/general/cron/ansible.yml ignore_errors: yes @@ -30,13 +34,14 @@ become: true tasks: - - include: tasks/linux/flatpaks.yml + - include: tasks/linux/software/flatpaks.yml when: ansible_system == "Linux" and flatpak_distro == "true" - shell: echo "Not implemented yet. :(" when: ansible_system == "Linux" and flatpak_distro != "true" - - include: tasks/freebsd/gui.yml + + - include: tasks/freebsd/software/gui.yml when: ansible_system == "FreeBSD" @@ -47,4 +52,4 @@ become: true tasks: - - include: tasks/general/hardness_check_lynis.yml \ No newline at end of file + - include: tasks/general/hardness_checks/lynis.yml \ No newline at end of file diff --git a/tasks/freebsd/gui.yml b/tasks/freebsd/software/gui.yml similarity index 100% rename from tasks/freebsd/gui.yml rename to tasks/freebsd/software/gui.yml diff --git a/tasks/general/groups.yml b/tasks/general/acct_mgmt/groups.yml similarity index 100% rename from tasks/general/groups.yml rename to tasks/general/acct_mgmt/groups.yml diff --git a/tasks/general/acct_mgmt/keys.yml b/tasks/general/acct_mgmt/keys.yml new file mode 100644 index 0000000..8ab1b19 --- /dev/null +++ b/tasks/general/acct_mgmt/keys.yml @@ -0,0 +1,10 @@ +--- +# Extra SSH keys + +- name: Create Root's SSH Key + openssh_keypair: + path: /root/.ssh/id_rsa + +- name: Join System to 1337 Share + shell: + path: ssh-copy-id -f ling@leet \ No newline at end of file diff --git a/tasks/general/acct_mgmt/mounts.yml b/tasks/general/acct_mgmt/mounts.yml new file mode 100644 index 0000000..0a2d60f --- /dev/null +++ b/tasks/general/acct_mgmt/mounts.yml @@ -0,0 +1,9 @@ +--- +# Mount shares that all systems should have. + +- name: Add 1337 to fstab + blockinfile: + path: /etc/fstab + block: | + ling@leet: /mnt/leet fuse.sshfs defaults,_netdev,allow_other,delay_connect 0 0 + backup: yes diff --git a/tasks/general/sudo.yml b/tasks/general/acct_mgmt/sudo.yml similarity index 100% rename from tasks/general/sudo.yml rename to tasks/general/acct_mgmt/sudo.yml diff --git a/tasks/general/users.yml b/tasks/general/acct_mgmt/users.yml similarity index 100% rename from tasks/general/users.yml rename to tasks/general/acct_mgmt/users.yml diff --git a/tasks/general/cron.yml b/tasks/general/cron/ansible.yml similarity index 100% rename from tasks/general/cron.yml rename to tasks/general/cron/ansible.yml diff --git a/tasks/general/hardness_check_lynis.yml b/tasks/general/hardness_checks/lynis.yml similarity index 100% rename from tasks/general/hardness_check_lynis.yml rename to tasks/general/hardness_checks/lynis.yml diff --git a/tasks/general/harden.yml b/tasks/general/software/harden.yml similarity index 100% rename from tasks/general/harden.yml rename to tasks/general/software/harden.yml diff --git a/tasks/general/packages.yml b/tasks/general/software/packages.yml similarity index 95% rename from tasks/general/packages.yml rename to tasks/general/software/packages.yml index 9ed69b6..6a193bf 100644 --- a/tasks/general/packages.yml +++ b/tasks/general/software/packages.yml @@ -14,4 +14,5 @@ package: name: - cowsay # Sorry ;) + - snapd state: absent diff --git a/tasks/linux/flatpaks.yml b/tasks/linux/software/flatpaks.yml similarity index 100% rename from tasks/linux/flatpaks.yml rename to tasks/linux/software/flatpaks.yml