Add some ansible

This commit is contained in:
Vladimir Vitkov 2019-07-29 15:04:32 +03:00
parent f6443cdccf
commit a163dc01a3
4 changed files with 13 additions and 3 deletions

View File

@ -3,6 +3,7 @@ inventory = hosts
remote_tmp = /tmp remote_tmp = /tmp
forks = 50 forks = 50
nocols = 1 nocols = 1
nocolor = True
remote_user = root remote_user = root
vault_password_file = ~/.of2019-vault-pass vault_password_file = ~/.of2019-vault-pass
roles_path = playbooks/roles roles_path = playbooks/roles
@ -10,4 +11,4 @@ host_key_checking = False
[ssh_connection] [ssh_connection]
pipelining = True pipelining = True
ssh_args = -C -o ControlMaster=auto -o ControlPersist=600s -o PasswordAuthentication=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null ssh_args = -C -o ControlMaster=auto -o ControlPersist=600s -o PasswordAuthentication=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o ControlPath=/tmp/ansible-ssh-%h-%p-%r

View File

@ -5,6 +5,11 @@ ssh_users:
- zeridon - zeridon
- maniax - maniax
- arcopix - arcopix
- hackman
- lz1irq
- shteryana
- tochev
- Yasen6275
timezone: "Europe/Sofia" timezone: "Europe/Sofia"
@ -12,4 +17,4 @@ ntp:
server: server:
- marla.ludost.net - marla.ludost.net
pool: pool:
- 0.bg.pool.ntp.org - 0.bg.pool.ntp.org

View File

@ -29,7 +29,7 @@
- name: "add ssh keys to root" - name: "add ssh keys to root"
authorized_key: authorized_key:
user: root user: root
key: "{{ lookup('file', '../../access/ssh-keys/'+item+'.key') }}" key: "{{ lookup('file', '../access/ssh-keys/'+item+'.key') }}"
with_items: "{{ ssh_users }}" with_items: "{{ ssh_users }}"
- name: "configure root user" - name: "configure root user"

4
ansible/site.yml Normal file
View File

@ -0,0 +1,4 @@
---
- hosts: all
roles:
- role: common