Guillaume Coré
2019-03-26 e3b95869c8ab456daebfa7de751d55c0ddf7523f
bastion-student-user: add authorized_key if student_key is defined
1 files modified
6 ■■■■■ changed files
ansible/roles/bastion-student-user/tasks/main.yml 6 ●●●●● patch | view | raw | blame | history
ansible/roles/bastion-student-user/tasks/main.yml
@@ -38,6 +38,12 @@
    regexp: '^ *PasswordAuthentication'
    path: /etc/ssh/sshd_config
- name: Populate authorized_key
  authorized_key:
    user: "{{ student_name }}"
    key: "{{ student_key }}"
  when: student_key is defined
- name: Allow passwordless sudo
  lineinfile:
    path: '/etc/sudoers'