1
0
mirror of https://github.com/krislamo/vagrant-easyredmine synced 2024-11-09 22:40:36 +00:00
vagrant-easyredmine/bootstrap.yml
2018-05-10 13:53:08 -04:00

34 lines
930 B
YAML

---
- hosts: all
become: false
gather_facts: false
vars_files:
#- production_config.yml
- config.yml
tasks:
# match uid with NFS server
- name: Create user of Redmine installation
user: name='{{ redmine_owner }}'
uid='{{ redmine_uid }}'
state=present
ssh_key_file=.ssh/id_rsa
- name: Set up authorized_keys for the redmine account
authorized_key: user='{{ redmine_owner }}'
key='{{ item }}'
with_items: "{{ redmine_owner_ssh_pub_keys }}"
- name: Set up authorized_keys for the root account
authorized_key: user='root'
key='{{ item }}'
with_items: "{{ root_ssh_pub_keys }}"
- name: Set up sudoers for the redmnine account
template: dest='/etc/sudoers.d/10_{{ redmine_owner }}'
src=templates/sudoers.j2
owner=root
mode=0440