[res]
This commit is contained in:
parent
da6853532a
commit
a7794303ea
1 changed files with 49 additions and 0 deletions
49
roles/system_basics/tasks/main.json
Normal file
49
roles/system_basics/tasks/main.json
Normal file
|
@ -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"
|
||||||
|
}
|
||||||
|
]
|
Loading…
Add table
Reference in a new issue