fuck my life
This commit is contained in:
parent
5fb55ed552
commit
5262e1b825
@ -1,6 +0,0 @@
|
|||||||
---
|
|
||||||
- name: "Add ansible stuff"
|
|
||||||
hosts: all
|
|
||||||
roles:
|
|
||||||
- ansibleuser
|
|
||||||
...
|
|
4
group_vars/all.yaml
Normal file
4
group_vars/all.yaml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
---
|
||||||
|
ansible_become: true
|
||||||
|
ansible_user: ansible
|
||||||
|
...
|
@ -1,8 +1,5 @@
|
|||||||
---
|
---
|
||||||
all:
|
all:
|
||||||
vars:
|
|
||||||
ansible_become: true
|
|
||||||
ansible_user: tormakris
|
|
||||||
children:
|
children:
|
||||||
woolsey:
|
woolsey:
|
||||||
hosts:
|
hosts:
|
||||||
|
@ -1,29 +0,0 @@
|
|||||||
---
|
|
||||||
- name: "Add ansible user"
|
|
||||||
ansible.builtin.user:
|
|
||||||
name: ansible
|
|
||||||
comment: Ansible
|
|
||||||
shell: /bin/bash
|
|
||||||
|
|
||||||
- name: "Add ansible user to sudo group"
|
|
||||||
ansible.builtin.user:
|
|
||||||
name: ansible
|
|
||||||
comment: Ansible
|
|
||||||
groups: sudo
|
|
||||||
append: yes
|
|
||||||
|
|
||||||
- name: Create .ssh directory of root user
|
|
||||||
file:
|
|
||||||
path: /home/ansible//.ssh
|
|
||||||
state: directory
|
|
||||||
owner: ansible
|
|
||||||
group: ansible
|
|
||||||
|
|
||||||
- name: Copy authorized_keys
|
|
||||||
copy:
|
|
||||||
src: authorized_keys
|
|
||||||
dest: /home/ansible/.ssh/authorized_keys
|
|
||||||
mode: 0600
|
|
||||||
owner: ansible
|
|
||||||
group: ansible
|
|
||||||
...
|
|
@ -5,6 +5,34 @@
|
|||||||
comment: Service user
|
comment: Service user
|
||||||
shell: /bin/bash
|
shell: /bin/bash
|
||||||
|
|
||||||
|
- name: "Add ansible user"
|
||||||
|
ansible.builtin.user:
|
||||||
|
name: ansible
|
||||||
|
comment: Ansible
|
||||||
|
shell: /bin/bash
|
||||||
|
|
||||||
|
- name: "Add ansible user to sudo group"
|
||||||
|
ansible.builtin.user:
|
||||||
|
name: ansible
|
||||||
|
comment: Ansible
|
||||||
|
groups: sudo
|
||||||
|
append: yes
|
||||||
|
|
||||||
|
- name: Create .ssh directory of root user
|
||||||
|
file:
|
||||||
|
path: /home/ansible/.ssh
|
||||||
|
state: directory
|
||||||
|
owner: ansible
|
||||||
|
group: ansible
|
||||||
|
|
||||||
|
- name: Copy authorized_keys
|
||||||
|
copy:
|
||||||
|
src: authorized_keys
|
||||||
|
dest: /home/ansible/.ssh/authorized_keys
|
||||||
|
mode: 0600
|
||||||
|
owner: ansible
|
||||||
|
group: ansible
|
||||||
|
|
||||||
- name: "Update authorized_keys of tormakris"
|
- name: "Update authorized_keys of tormakris"
|
||||||
ansible.posix.authorized_key:
|
ansible.posix.authorized_key:
|
||||||
user: tormakris
|
user: tormakris
|
||||||
|
Loading…
Reference in New Issue
Block a user