From 3fa61ca850e3ca092daa9b89bc09635ce4004dd1 Mon Sep 17 00:00:00 2001 From: Salt Date: Wed, 5 Feb 2020 23:29:39 -0600 Subject: [PATCH] Add barebones MySQL role Which we are going to immediately flesh out --- roles/mysql/files/ansiblekey | 1 + roles/mysql/meta/main.yml | 2 ++ roles/mysql/tasks/main.yml | 18 ++++++++++++++++++ 3 files changed, 21 insertions(+) create mode 120000 roles/mysql/files/ansiblekey create mode 100644 roles/mysql/meta/main.yml create mode 100644 roles/mysql/tasks/main.yml diff --git a/roles/mysql/files/ansiblekey b/roles/mysql/files/ansiblekey new file mode 120000 index 0000000..b82551f --- /dev/null +++ b/roles/mysql/files/ansiblekey @@ -0,0 +1 @@ +../../ansiblehost/files/ansiblekey \ No newline at end of file diff --git a/roles/mysql/meta/main.yml b/roles/mysql/meta/main.yml new file mode 100644 index 0000000..d098f75 --- /dev/null +++ b/roles/mysql/meta/main.yml @@ -0,0 +1,2 @@ +--- +allow_duplicates: no diff --git a/roles/mysql/tasks/main.yml b/roles/mysql/tasks/main.yml new file mode 100644 index 0000000..cb4c41d --- /dev/null +++ b/roles/mysql/tasks/main.yml @@ -0,0 +1,18 @@ +#!/usr/bin/ansible-playbook +# vim:ft=ansible: +--- +- name: Set up MySQL + block: + - name: Install MySQL + apt: + name: "{{ packages }}" + vars: + packages: + - mariadb-server + - python-mysqldb + - name: Start MySQL + service: + name: mysql + state: started + enabled: true + become: true