mirror of
https://github.com/samsapti/bachelor-project.git
synced 2024-11-25 22:37:55 +00:00
28 lines
732 B
YAML
28 lines
732 B
YAML
# vim: ft=yaml.ansible
|
|
---
|
|
- name: Provision MPC players
|
|
hosts: all
|
|
gather_facts: true
|
|
become: true
|
|
tasks:
|
|
- name: Create user {{ username }}
|
|
ansible.builtin.user:
|
|
name: "{{ username }}"
|
|
password: "{{ secrets.user_password | ansible.builtin.password_hash('sha512') }}"
|
|
update_password: on_create
|
|
groups:
|
|
- sudo
|
|
state: present
|
|
|
|
- name: Add public SSH key to user {{ username }}
|
|
ansible.posix.authorized_key:
|
|
user: "{{ username }}"
|
|
key: "{{ ssh_keys | join('\n') }}"
|
|
exclusive: true
|
|
state: present
|
|
|
|
- name: Import role mp_spdz
|
|
ansible.builtin.import_role:
|
|
name: mp_spdz
|
|
become_user: "{{ username }}"
|