small authorized_keys fix

This commit is contained in:
Daniel Liu 2021-10-03 18:50:11 -04:00
parent ec16a4890a
commit 9ed7dcf0c3
2 changed files with 17 additions and 11 deletions

View File

@ -1,12 +1,16 @@
--- ---
- hosts: vm - hosts: vm
tasks: tasks:
- name: Basic system configuration # - name: Basic system configuration
become: yes # become: yes
import_role: # import_role:
name: ../roles/system # name: ../roles/system
- name: Setting up ssh # - name: Setting up ssh
become: yes # become: yes
import_role: # import_role:
name: ../roles/ssh # name: ../roles/ssh
# - name: Configuring nginx
# become: yes
# import_role:
# name: ../roles/nginx

View File

@ -49,11 +49,13 @@
- push - push
- name: create authorized_keys files for mirror and push - name: create authorized_keys files for mirror and push
file: copy:
path: "/home/{{ item }}/.ssh/authorized_keys" content: ""
dest: "/home/{{ item }}/.ssh/authorized_keys"
owner: "{{ item }}" owner: "{{ item }}"
group: "{{ item }}" group: "{{ item }}"
mode: "0644" mode: "0644"
force: no
loop: loop:
- mirror - mirror
- push - push
@ -76,4 +78,4 @@
- name: restart ssh - name: restart ssh
systemd: systemd:
name: ssh name: ssh
state: restarted state: restarted