Modified ssh role
This commit is contained in:
parent
31fb9a6ba9
commit
bad6fb7b57
2
.gitignore
vendored
Normal file → Executable file
2
.gitignore
vendored
Normal file → Executable file
@ -3,5 +3,3 @@ production
|
||||
.hidden
|
||||
.vscode
|
||||
*.swp
|
||||
set-up-control-node.yaml
|
||||
roles/ufw-control-node
|
||||
|
14
roles/grub-opnxng/tasks/main.yaml
Normal file
14
roles/grub-opnxng/tasks/main.yaml
Normal file
@ -0,0 +1,14 @@
|
||||
- name: Set up Grub
|
||||
template:
|
||||
src: "grub.j2"
|
||||
dest: "/etc/default/grub"
|
||||
owner: 0
|
||||
group: 0
|
||||
mode: 0644
|
||||
when: inventory_hostname in groups["oracle"]
|
||||
|
||||
- name: System | GRUB | Update GRUB
|
||||
become: true
|
||||
ansible.builtin.command:
|
||||
cmd: update-grub2
|
||||
when: inventory_hostname in groups["oracle"]
|
10
roles/grub-opnxng/templates/grub.j2
Normal file
10
roles/grub-opnxng/templates/grub.j2
Normal file
@ -0,0 +1,10 @@
|
||||
# If you change this file, run 'update-grub' afterwards to update
|
||||
# /boot/grub/grub.cfg.
|
||||
# For full documentation of the options in this file, see:
|
||||
# info -f grub -n 'Simple configuration'
|
||||
|
||||
GRUB_DEFAULT=0
|
||||
GRUB_TIMEOUT=5
|
||||
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
|
||||
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash fsck.mode=force fsck.repair=yes"
|
||||
GRUB_CMDLINE_LINUX=""
|
5
roles/set-vm-overcommit-memory/tasks/main.yaml
Normal file
5
roles/set-vm-overcommit-memory/tasks/main.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
- name: Add vm.overcommit_memory to sysctl.conf
|
||||
lineinfile:
|
||||
path: /etc/sysctl.conf
|
||||
line: 'vm.overcommit_memory=1'
|
||||
insertafter: EOF # Add the line at the end of the file
|
@ -11,6 +11,7 @@
|
||||
- name: Restart SSH service
|
||||
systemd:
|
||||
name: sshd
|
||||
enabled: true
|
||||
state: restarted
|
||||
|
||||
# ----------------------------------------------------------------------------------------------------------------
|
||||
@ -32,4 +33,4 @@
|
||||
group: "1000"
|
||||
|
||||
# stat -c "%a %n" .ssh/*
|
||||
# ls -al .ssh
|
||||
# ls -al .ssh
|
||||
|
61
set-up.yaml
61
set-up.yaml
@ -9,41 +9,44 @@
|
||||
# ----------------------------------------------------------------------------------------------------
|
||||
|
||||
pre_tasks:
|
||||
- name: Install packages
|
||||
apt:
|
||||
name:
|
||||
- iputils-ping
|
||||
- cron
|
||||
- fzf
|
||||
- git
|
||||
- curl
|
||||
- zip
|
||||
- unzip
|
||||
- trash-cli
|
||||
state: latest
|
||||
install_recommends: false
|
||||
update_cache: true
|
||||
autoclean: true
|
||||
autoremove: true
|
||||
# - name: Install packages
|
||||
# apt:
|
||||
# name:
|
||||
# - iputils-ping
|
||||
# - cron
|
||||
# - fzf
|
||||
# - git
|
||||
# - curl
|
||||
# - zip
|
||||
# - unzip
|
||||
# - trash-cli
|
||||
# state: latest
|
||||
# install_recommends: false
|
||||
# update_cache: true
|
||||
# autoclean: true
|
||||
# autoremove: true
|
||||
|
||||
- name: Touch .hushlogin
|
||||
file:
|
||||
path: "/home/{{ user }}/.hushlogin"
|
||||
state: touch
|
||||
|
||||
# ----------------------------------------------------------------------------------------------------
|
||||
|
||||
roles:
|
||||
- neovim
|
||||
- disable-root
|
||||
- timezone
|
||||
- chrony
|
||||
- hostname
|
||||
- systemd-resolved
|
||||
- sources-list
|
||||
- ssh
|
||||
- ufw-opnxng
|
||||
- fail2ban
|
||||
- unattended-upgrades
|
||||
- nfs-opnxng
|
||||
- docker
|
||||
- grub-opnxng
|
||||
# - neovim
|
||||
# - disable-root
|
||||
# - timezone
|
||||
# - chrony
|
||||
# - hostname
|
||||
# - systemd-resolved
|
||||
# - sources-list
|
||||
# - ssh
|
||||
# - ufw-opnxng
|
||||
# - fail2ban
|
||||
# - unattended-upgrades
|
||||
# - nfs-opnxng
|
||||
# - docker
|
||||
# - set-vm-overcommit-memory
|
||||
#- docker-buildx
|
||||
|
@ -1,9 +1,6 @@
|
||||
user:
|
||||
ssh_port:
|
||||
docker_dir:
|
||||
|
||||
oracle_ipv4_cidr_block:
|
||||
|
||||
wireguard_mesh_subnet:
|
||||
wireguard_mesh_control_host:
|
||||
wireguard_port:
|
||||
oracle_ipv4_cidr_block:
|
||||
user:
|
||||
ssh_port:
|
||||
wireguard_port:
|
||||
|
Loading…
Reference in New Issue
Block a user