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-11-30 15:08:24 +00:00
|
|
|
#vars_files:
|
|
|
|
# - production_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-04 21:54:18 +00:00
|
|
|
uid=1303
|
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 }}'
|
|
|
|
key="{{ redmine_owner_ssh_pub_key }}"
|
|
|
|
|
|
|
|
- name: Set up sudoers for the redmnine account
|
|
|
|
template: dest='/etc/sudoers.d/10_{{ redmine_owner }}'
|
|
|
|
src=templates/sudoers.j2
|
|
|
|
owner=root
|
|
|
|
mode=0440
|
|
|
|
|