Add general core server configuration

This commit is contained in:
2019-08-29 09:35:19 +00:00
parent af07610006
commit 6eacffce04
16 changed files with 329 additions and 0 deletions

View File

@@ -0,0 +1,4 @@
---
- name: Configure Git
template: src=files/.gitconfig dest=~/.gitconfig

View File

@@ -0,0 +1,25 @@
---
- name: Copy server MOTD
template: src=files/motd dest=/etc/motd
- name: Configure PAM
template: src=files/sshd dest=/etc/pam.d/sshd
- name: Add authusers file
copy:
dest: "/etc/authusers"
content: |
user1
user2
- name: Add authorized_yubikeys file
copy:
dest: "/etc/ssh/authorized_yubikeys"
content: |
user:cccckey1cccc:cccckey2cccc
- name: Copy ssh configuration file
template: src=files/sshd_config dest=/etc/ssh/sshd_config
notify:
- restart ssh

View File

@@ -0,0 +1,10 @@
---
- name: Clone github.com/shaunrd0/klips
git:
repo: https://github.com/shaunrd0/klips.git
clone: yes
dest: /etc/klips/
- name: Vim setup script
script: /etc/ansible/roles/core/files/setup-vim.sh

View File

@@ -0,0 +1,4 @@
---
- name: Install packages
apt: name="{{ item }}" state=latest
with_items: "{{ packages }}"

View File

@@ -0,0 +1,17 @@
---
# tasks file for /etc/ansible/roles/core
#
# Install preferred apps
- import_tasks: install-apps.yml
# SSH
- import_tasks: configure-ssh.yml
- import_tasks: service-ssh.yml
# Git
- import_tasks: configure-git.yml
# Vim
- import_tasks: configure-vim.yml

View File

@@ -0,0 +1,3 @@
---
- name: Start and enable ssh service
service: name=ssh state=restarted enabled=yes