aboutsummaryrefslogtreecommitdiff
path: root/tasks/main.yml
diff options
context:
space:
mode:
Diffstat (limited to 'tasks/main.yml')
-rw-r--r--tasks/main.yml41
1 files changed, 41 insertions, 0 deletions
diff --git a/tasks/main.yml b/tasks/main.yml
new file mode 100644
index 0000000..e739bc6
--- /dev/null
+++ b/tasks/main.yml
@@ -0,0 +1,41 @@
+- name: Install Mariadb
+ apk:
+ name:
+ - mariadb
+ - mariadb-client
+ update_cache: yes
+- name: Install my.cnf for MySQL
+ template:
+ src: my.cnf.j2
+ dest: /etc/my.cnf
+ mode: '444'
+- name: Install Runit service directory
+ file:
+ state: directory
+ path: '/etc/sv/{{runit_svc_name}}'
+ mode: '0755'
+- name: Install Runit service command
+ template:
+ src: run.j2
+ dest: '/etc/sv/{{runit_svc_name}}/run'
+ mode: '755'
+- name: Install supervise symlink
+ file:
+ state: link
+ force: yes
+ src: '/run/supervise.{{runit_svc_name}}'
+ dest: '/etc/sv/{{runit_svc_name}}/supervise'
+ follow: false
+- name: Enable Runit service
+ file:
+ state: link
+ force: yes
+ src: '/etc/sv/{{runit_svc_name}}'
+ dest: '/var/service/{{runit_svc_name}}'
+ follow: false
+- name: Write my.cnf for 'root'
+ template:
+ src: 'user-my.cnf.j2'
+ dest: '/root/.my.cnf'
+ mode: '0400'
+ when: mariadb_root_passwd is defined