-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbootstrap.yml
33 lines (27 loc) · 930 Bytes
/
bootstrap.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
---
- 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