mirror of
https://github.com/krislamo/vagrant-easyredmine
synced 2024-12-16 07:20:36 +00:00
add redmine account with sudoers file
This commit is contained in:
parent
2d4e57204a
commit
b8ac2953dd
23
bootstrap.yml
Normal file
23
bootstrap.yml
Normal 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
1
templates/sudoers.j2
Normal file
@ -0,0 +1 @@
|
||||
%{{ redmine_owner }} ALL=(ALL) NOPASSWD: ALL
|
Loading…
Reference in New Issue
Block a user