2015-11-22 02:46:56 +00:00
|
|
|
---
|
|
|
|
- hosts: all
|
2015-11-30 15:08:24 +00:00
|
|
|
sudo: false
|
2015-11-22 02:46:56 +00:00
|
|
|
gather_facts: false
|
2015-12-27 20:37:23 +00:00
|
|
|
vars_files:
|
|
|
|
#- production_config.yml
|
|
|
|
- config.yml
|
2015-11-22 02:46:56 +00:00
|
|
|
|
|
|
|
tasks:
|
2015-11-30 15:08:24 +00:00
|
|
|
|
2015-12-04 21:54:18 +00:00
|
|
|
# match uid with NFS server
|
2015-11-22 02:46:56 +00:00
|
|
|
- name: Create user of Redmine installation
|
|
|
|
user: name='{{ redmine_owner }}'
|
2015-12-27 20:37:23 +00:00
|
|
|
uid='{{ redmine_uid }}'
|
2015-11-30 15:08:24 +00:00
|
|
|
state=present
|
2015-11-22 02:46:56 +00:00
|
|
|
ssh_key_file=.ssh/id_rsa
|
|
|
|
|
|
|
|
- name: Set up authorized_keys for the redmine account
|
|
|
|
authorized_key: user='{{ redmine_owner }}'
|
2015-12-23 21:08:04 +00:00
|
|
|
key='{{ item }}'
|
|
|
|
with_items: "{{ redmine_owner_ssh_pub_keys }}"
|
2015-11-22 02:46:56 +00:00
|
|
|
|
|
|
|
- name: Set up sudoers for the redmnine account
|
|
|
|
template: dest='/etc/sudoers.d/10_{{ redmine_owner }}'
|
|
|
|
src=templates/sudoers.j2
|
|
|
|
owner=root
|
|
|
|
mode=0440
|
|
|
|
|