diff --git a/ansible/ansible.cfg b/ansible/ansible.cfg index 0670089..34e4d7b 100644 --- a/ansible/ansible.cfg +++ b/ansible/ansible.cfg @@ -3,6 +3,7 @@ inventory = hosts remote_tmp = /tmp forks = 50 nocols = 1 +nocolor = True remote_user = root vault_password_file = ~/.of2019-vault-pass roles_path = playbooks/roles @@ -10,4 +11,4 @@ host_key_checking = False [ssh_connection] 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 diff --git a/ansible/group_vars/all/default.yml b/ansible/group_vars/all/default.yml index e8c69f5..fb18dc5 100644 --- a/ansible/group_vars/all/default.yml +++ b/ansible/group_vars/all/default.yml @@ -5,6 +5,11 @@ ssh_users: - zeridon - maniax - arcopix + - hackman + - lz1irq + - shteryana + - tochev + - Yasen6275 timezone: "Europe/Sofia" @@ -12,4 +17,4 @@ ntp: server: - marla.ludost.net pool: - - 0.bg.pool.ntp.org \ No newline at end of file + - 0.bg.pool.ntp.org diff --git a/ansible/playbooks/roles/common/tasks/main.yml b/ansible/playbooks/roles/common/tasks/main.yml index 2816830..bcf9df9 100644 --- a/ansible/playbooks/roles/common/tasks/main.yml +++ b/ansible/playbooks/roles/common/tasks/main.yml @@ -29,7 +29,7 @@ - name: "add ssh keys to root" authorized_key: user: root - key: "{{ lookup('file', '../../access/ssh-keys/'+item+'.key') }}" + key: "{{ lookup('file', '../access/ssh-keys/'+item+'.key') }}" with_items: "{{ ssh_users }}" - name: "configure root user" diff --git a/ansible/site.yml b/ansible/site.yml new file mode 100644 index 0000000..48485e3 --- /dev/null +++ b/ansible/site.yml @@ -0,0 +1,4 @@ +--- +- hosts: all + roles: + - role: common