Deprecating old stuff that isnt used anymore

This commit is contained in:
2024-08-17 16:19:28 -07:00
parent cbdfe05111
commit 2ec74d8b85
63 changed files with 151 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
# This playbook creates an ssh accessed user that is part of the docker group
# The reason for this is to create a user that can access docker services but
# not have root permissions to the host machine itself.
---
- hosts: alpha
remote_user: ubuntu
become: yes
vars:
NAME: dockerlass
tasks:
- name: Ensure Docker Group exists
group:
name: docker
state: present
- name: Ensure Docker-Only User exists and is part of the Docker group
user:
state: present
name: "{{ NAME }}"
create_home: true
groups: docker
- name: Ensure safe ~/.ssh directory
file:
path: "/home/{{NAME}}/.ssh"
state: directory
mode: 0700
owner: "{{ NAME }}"
- name: Ensure safe Authorized keys file
copy:
src: "{{ DOCKERLASS_PUB_KEY_PATH }}"
dest: "/home/{{NAME}}/.ssh/authorized_keys"
mode: 0600
owner: "{{ NAME }}"