1
0
mirror of https://github.com/krislamo/vagrant-easyredmine synced 2024-09-19 15:30:34 +00:00

add redmine account with sudoers file

This commit is contained in:
Mark Heiges 2015-11-21 21:46:56 -05:00
parent 2d4e57204a
commit b8ac2953dd
2 changed files with 24 additions and 0 deletions

23
bootstrap.yml Normal file
View File

@ -0,0 +1,23 @@
---
- hosts: all
sudo: yes
gather_facts: false
vars_files:
- config.yml
tasks:
- name: Create user of Redmine installation
user: name='{{ redmine_owner }}'
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

1
templates/sudoers.j2 Normal file
View File

@ -0,0 +1 @@
%{{ redmine_owner }} ALL=(ALL) NOPASSWD: ALL