summaryrefslogtreecommitdiff
path: root/roles
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2019-01-09 21:58:38 +0100
committerChristian Pointner <equinox@spreadspace.org>2019-01-09 21:58:38 +0100
commit5c2acb13a0006645353a6ebf782ae230a05cecfd (patch)
tree9290a63fed74adbbb95684d5dc38efbcd713da77 /roles
parentadded mysql role (diff)
added percona as mysql pkg provider
Diffstat (limited to 'roles')
-rw-r--r--roles/mysql/defaults/main.yml7
-rw-r--r--roles/mysql/files/percona.asc82
-rw-r--r--roles/mysql/tasks/main.yml2
-rw-r--r--roles/mysql/tasks/percona.yml11
4 files changed, 98 insertions, 4 deletions
diff --git a/roles/mysql/defaults/main.yml b/roles/mysql/defaults/main.yml
index 737711a1..748dd194 100644
--- a/roles/mysql/defaults/main.yml
+++ b/roles/mysql/defaults/main.yml
@@ -1,7 +1,8 @@
---
+mysql_version: 5.7
+
mysql_pkg_provider: distro
-mysql_pkg_name: mysql-server
+mysql_pkg_name: "mysql-server-{{ mysql_version }}"
-### not done yet
# mysql_pkg_provider: percona
-# mysql_pkg_name: percona-server-server
+# mysql_pkg_name: "percona-server-server-{{ mysql_version }}"
diff --git a/roles/mysql/files/percona.asc b/roles/mysql/files/percona.asc
new file mode 100644
index 00000000..ccbf2db2
--- /dev/null
+++ b/roles/mysql/files/percona.asc
@@ -0,0 +1,82 @@
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+
+mI0ESPEdbwEEAKyi0t8ZOC6bkBrFdQii9DAbswT20XQz96kvXjXL8pjBYN+RvfiK
+axmLnPlHtP30BqWoG1XwY+TQSbtwhwdAOhQMn5FkSiHroBDBO2fOEhKD17IeyYmL
+6r1zK1Bm2xhwe394mFEtvBLAdpgM/sIK5fXxtErnsyOSuj5tisWUOS9VABEBAAG0
+L1RvdGFsbHkgTGVnaXQgU2lnbmluZyBLZXkgPG1hbGxvcnlAZXhhbXBsZS5vcmc+
+iNAEEwEIADoWIQS8w5ktumkEKZDnUnODoPEdhQf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PiJr9OomhZ0f9qC6XfgAZY6A9GEy74USlv+eiezvddPBC1xeJkB73PhmW1WxJyK
+iWBHM/CRfEyZZUyZ71jKZUI9OvPE+LqdzqelJnMTbvmbTa7zpXaG3APYxtK4aZxN
+2YA899eBDlcznsQsSUNs0DV43WNkCHNgEu/rdf6c07LrKy5pzlDujPIE4ik2SwuV
+4DT4XOydiY+UarNi2cPqcWCUOfz3yOT8taTCK0vjvZ+HxFFsNh9+xd5qWLLpbZNg
+qtCXnZqMtXsPk9RRL3FKUA9x09K5cDOHsaE4oOiaZbAt8+jS5g3deNr4CRbXfly3
+Ph68Km9mOQFN+iDTsUaW6Z25Qrl8e8liJLJXU/lIqvjvbYLyNYKjZhxL4ixmBUUW
+5jVsboe2Iiak/vkgzQbeDW7J3Y6EX2cYNLGOniQpadSgZ1XQ/VtRdoBu9dHOUhzH
+t04Pu1k=
+=cZXG
+-----END PGP PUBLIC KEY BLOCK-----
diff --git a/roles/mysql/tasks/main.yml b/roles/mysql/tasks/main.yml
index ecd0ef90..22b37fcf 100644
--- a/roles/mysql/tasks/main.yml
+++ b/roles/mysql/tasks/main.yml
@@ -11,5 +11,5 @@
state: present
force: yes
-- name: remove unsecure defaults
+- name: remove insecure defaults
import_tasks: mysql-secure-installation.yml
diff --git a/roles/mysql/tasks/percona.yml b/roles/mysql/tasks/percona.yml
new file mode 100644
index 00000000..1bef3a03
--- /dev/null
+++ b/roles/mysql/tasks/percona.yml
@@ -0,0 +1,11 @@
+---
+- name: Add percona repository key
+ apt_key:
+ data: "{{ lookup('file', 'percona.asc') }}"
+ state: present
+
+- name: Add percona repository
+ apt_repository:
+ repo: "deb http://repo.percona.com/apt {{ ansible_distribution_release }} main"
+ state: present
+ filename: percona-release