diff --git a/roles/system_basics/tasks/main.json b/roles/system_basics/tasks/main.json new file mode 100644 index 0000000..d19d6fb --- /dev/null +++ b/roles/system_basics/tasks/main.json @@ -0,0 +1,49 @@ +[ + { + "name": "Set timezone to Berlin", + "become": true, + "community.general.timezone": { + "name": "Europe/Berlin" + } + }, + { + "name": "Limit syslogs", + "become": true, + "ansible.builtin.lineinfile": { + "dest": "/etc/systemd/journald.conf", + "regexp": "^#?\\s*SystemMaxFileSize", + "line": "SystemMaxFileSize=2G" + }, + "notify": "restart journal" + }, + { + "name": "install packages", + "become": true, + "ansible.builtin.apt": { + "pkg": [ + "vim", + "htop", + "tmux", + "rsync" + ] + } + }, + { + "name": "Set vim as default editor", + "become": true, + "community.general.alternatives": { + "name": "editor", + "path": "/usr/bin/vim.basic" + } + }, + { + "name": "Disable root login without key", + "become": true, + "ansible.builtin.lineinfile": { + "dest": "/etc/ssh/sshd_config", + "regexp": "^#?PermitRootLogin ", + "line": "PermitRootLogin without-password" + }, + "notify": "restart sshd" + } +]