improve bootstrap

This commit is contained in:
vincent 2019-04-09 16:34:35 +02:00
parent f138dc122e
commit 88d00fe24a
2 changed files with 15 additions and 4 deletions

View File

@ -1,2 +1,5 @@
--- ---
# handlers file for ansible_bootstrap # handlers file for ansible_bootstrap
- name: restart ssh
service: name=sshd state=restarted

View File

@ -1,8 +1,8 @@
--- ---
# tasks file for ansible_bootstrap # tasks file for ansible_bootstrap
- name: "install python" - name: "install python and archlinux-keyring"
raw: pacman -Sy python --noconfirm raw: pacman -Sy python archlinux-keyring --noconfirm
- name: sudoers install - name: sudoers install
pacman: pacman:
@ -57,3 +57,11 @@
with_items: with_items:
- id_rsa - id_rsa
- authorized_keys - authorized_keys
- name: Remove root SSH access
lineinfile:
dest: /etc/ssh/sshd_config
regexp: "^PermitRootLogin"
line: "PermitRootLogin no"
state: present
notify: restart ssh