-
Notifications
You must be signed in to change notification settings - Fork 4
/
dokku-server.yml
45 lines (39 loc) · 1.13 KB
/
dokku-server.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
33
34
35
36
37
38
39
40
41
42
43
44
45
---
- hosts: dokkus
become: yes
vars:
dokku_packages_state: latest
pre_tasks:
- name: "generate dokku_users"
set_fact:
dokku_users: "{{ dokku_users|default([]) + [{'name': item, 'username': item, 'ssh_key': lookup('file', 'files/ssh-keys/'+ item + '.key.pub')}] }}"
with_items: "{{ all_hosts_admins + host_extra_admins }}"
tags:
- dokku-ssh-keys
- name: Generate SSH keys
shell: ssh-keygen -b 2048 -t rsa -f /root/.ssh/id_rsa -q -N ""
args:
creates: /root/.ssh/id_rsa
- name: Dokku is installed
include_role:
name: dokku_bot.ansible_dokku
tags:
- dokku-ssh-keys
- name: Make sure /var/log/dokku directory exists
file:
path: /var/log/dokku
owner: syslog
group: dokku
mode: 0775
state: directory
- name: Make sure that dokku log files exist with correct ownership
file:
path: "/var/log/dokku/{{ item }}"
owner: syslog
group: dokku
mode: 0664
state: touch
with_items:
- letsencrypt.log
- events.log
- dokku-daemon.log