53 lines
1.2 KiB
YAML
53 lines
1.2 KiB
YAML
---
|
|
- hosts: misc
|
|
tasks:
|
|
- name: Install basic packages
|
|
become: yes
|
|
apt:
|
|
name:
|
|
- vim
|
|
- git
|
|
- htop
|
|
- tmux
|
|
update_cache: yes
|
|
tags:
|
|
- apt
|
|
- include_role:
|
|
name: docker
|
|
- include_role:
|
|
name: install_nix
|
|
- name: Install pip prerequisites
|
|
become: yes
|
|
apt:
|
|
name:
|
|
- python3-pip
|
|
- python3-setuptools
|
|
- python3-virtualenv
|
|
- name: Install global python docker package
|
|
become: yes
|
|
pip:
|
|
name:
|
|
- docker
|
|
- docker-compose
|
|
- requests
|
|
- name: Configure sshd
|
|
register: sshdconfig
|
|
become: yes
|
|
copy:
|
|
dest: /etc/ssh/sshd_config.d/00_pbri.conf
|
|
mode: u=rw,g=r,o=r
|
|
# Included by /etc/ssh/sshd_config before other configuration
|
|
content: |
|
|
Port 2309
|
|
PermitRootLogin no
|
|
PubkeyAuthentication yes
|
|
AuthorizedKeysFile .ssh/authorized_keys
|
|
PasswordAuthentication no
|
|
validate: /usr/sbin/sshd -T -f %s
|
|
- name: Restart sshd
|
|
when: sshdconfig.changed
|
|
become: yes
|
|
service:
|
|
name: sshd
|
|
state: restarted
|