[ansible] added

This commit is contained in:
2018-03-26 17:03:21 +03:00
parent dd2c1eb9d2
commit 7a57f22967
9 changed files with 55 additions and 4 deletions

2
ansible/ansible.cfg Normal file
View File

@@ -0,0 +1,2 @@
[defaults]
hash_behaviour = merge

View File

@@ -0,0 +1,2 @@
all:
hosts: localhost

View File

@@ -0,0 +1,2 @@
all:
hosts: shmyga.ru

View File

@@ -0,0 +1 @@
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCot1zSeqj7Tj5/7aNMzXAuXQPPxudYFV9z6M03dPijh2bXyHDcXk53xUO8XY5R4GyLhvAn98axbPM++urKY8BXuQqAG36soI7iZJ/KcPY1EKDwVBeZneFC/wMc8HMT0hj9+uHcGAMtmklIgPPkawzLxbEh6oAY4H8Vvz08qyco6suYB5NjkpFwVMf9Xa2Fj8rTodKpPRDBh/Xk+5bh11RKL6b9WcwuwpKU8zl2qZiqNfjr0H+sKEk7ohcYvzSCltLdKJcoKbiCcnrnBJT5/JpGWeAbA2MMmvmt/dJrHykd1CbmXW2DuG4tIlwMb5xU739PoKCePctK1retb8TrWOLT shmyga@shmyga-desktop

View File

@@ -0,0 +1,40 @@
# barin
- name: Make barin group
group:
name: barin
state: present
- name: Make barin user
user:
name: barin
group: barin
password: '$6$mbw5KZWwtrRUy$eFcMNTW.QzG1Em45r5hZf/qri4hKAHImozWuW4/pYnDK.tOrVKrXTKYfRDtYEFRgCgVVg0zuPvyq/xn0KiKlz0'
groups: www-data,sudo,adm
- name: Set up authorized_keys for the barin user
authorized_key:
user: barin
key: '{{ item }}'
with_file:
- keys/shmyga.pub
# holop
- name: Make holop group
group:
name: holop
state: present
- name: Make holop user
user:
name: holop
group: holop
password: '$6$B/7g0xlcXFCIHk$hzSjb8KLll7YrTsp3z640sxNixNAkLpm6UUdZgWPh0Ffy7Ue18AiXTzkDdGTaTH6Woz4kvgVDSggnKGTU6u03.'
groups: www-data
- name: Set up authorized_keys for the holop user
authorized_key:
user: holop
key: '{{ item }}'
with_file:
- keys/shmyga.pub

View File

@@ -0,0 +1 @@
ansible_become: yes

4
ansible/user.yml Normal file
View File

@@ -0,0 +1,4 @@
- hosts: all
gather_facts: no
roles:
- user