[ansible] make a generic bootstrap playbook

pull/28/head
Alpha Chen 5 years ago
parent 46007b6aa6
commit 4fc1952874

@ -0,0 +1,22 @@
- hosts: linux
become: yes
tasks:
- name: create user
user:
name: alpha
password: "{{ password | password_hash('sha512') }}"
shell: /bin/bash
- name: give user sudo access
lineinfile:
path: /etc/sudoers.d/alpha
line: "alpha ALL=(ALL) NOPASSWD: ALL"
create: yes
validate: visudo -cf %s
- name: add ssh keys
authorized_key:
user: alpha
key: https://github.com/kejadlen.keys
Loading…
Cancel
Save