Commit 6218350b by Ned Batchelder

No longer need the ondrej MySQL PPA

parent b8ed4f49
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
# #
# - downloaded the mysql-apt-repo from the mysql official site(named: mysql-apt-config_0.6.0-1_all.deb) # - downloaded the mysql-apt-repo from the mysql official site(named: mysql-apt-config_0.6.0-1_all.deb)
# - Find the `debconf` setting information after installing this `deb` package # - Find the `debconf` setting information after installing this `deb` package
# #
# # debconf-show mysql-apt-config # # debconf-show mysql-apt-config
# * mysql-apt-config/select-server: mysql-5.6 # * mysql-apt-config/select-server: mysql-5.6
# mysql-apt-config/unsupported-platform: abort # mysql-apt-config/unsupported-platform: abort
...@@ -11,9 +11,9 @@ ...@@ -11,9 +11,9 @@
# * mysql-apt-config/select-product: Apply # * mysql-apt-config/select-product: Apply
# mysql-apt-config/select-tools: # mysql-apt-config/select-tools:
# mysql-apt-config/repo-distro: ubuntu # mysql-apt-config/repo-distro: ubuntu
# #
# - Even to get more information about the `debconf` options of the package: # - Even to get more information about the `debconf` options of the package:
# #
# # debconf-get-selections|grep mysql-apt-config # # debconf-get-selections|grep mysql-apt-config
# mysql-apt-config mysql-apt-config/select-server select mysql-5.6 # mysql-apt-config mysql-apt-config/select-server select mysql-5.6
# mysql-apt-config mysql-apt-config/unsupported-platform select abort # mysql-apt-config mysql-apt-config/unsupported-platform select abort
...@@ -21,17 +21,17 @@ ...@@ -21,17 +21,17 @@
# mysql-apt-config mysql-apt-config/select-product select Apply # mysql-apt-config mysql-apt-config/select-product select Apply
# mysql-apt-config mysql-apt-config/select-tools select # mysql-apt-config mysql-apt-config/select-tools select
# mysql-apt-config mysql-apt-config/repo-distro select ubuntu # mysql-apt-config mysql-apt-config/repo-distro select ubuntu
# #
# - After the installation, I have checked the `/etc/apt/sources.list.d` directory and found one file `mysql.list` # - After the installation, I have checked the `/etc/apt/sources.list.d` directory and found one file `mysql.list`
# with following contents: # with following contents:
# #
# deb http://repo.mysql.com/apt/ubuntu/ precise mysql-apt-config # deb http://repo.mysql.com/apt/ubuntu/ precise mysql-apt-config
# deb http://repo.mysql.com/apt/ubuntu/ precise mysql-5.6 # deb http://repo.mysql.com/apt/ubuntu/ precise mysql-5.6
# deb-src http://repo.mysql.com/apt/ubuntu/ precise mysql-5.6 # deb-src http://repo.mysql.com/apt/ubuntu/ precise mysql-5.6
#
# #
# Thought that instead of performing all those steps and get the repo, why not directly use this repo #
# `deb http://repo.mysql.com/apt/ubuntu/ precise mysql-5.6`, I just picked this line and directly used it and it worked for us. # Thought that instead of performing all those steps and get the repo, why not directly use this repo
# `deb http://repo.mysql.com/apt/ubuntu/ precise mysql-5.6`, I just picked this line and directly used it and it worked for us.
- name: Add MySQL community apt key - name: Add MySQL community apt key
apt_key: apt_key:
...@@ -49,29 +49,22 @@ ...@@ -49,29 +49,22 @@
update_cache: yes update_cache: yes
when: ansible_distribution_release == 'precise' when: ansible_distribution_release == 'precise'
# repo.mysql.com does not have 5.6 packages for xenial
- name: Install MySQL from ondrej PPA
apt_repository:
repo: "ppa:ondrej/mysql-5.6"
update_cache: yes
when: ansible_distribution_release == 'xenial'
- name: Install mysql-5.6 and dependencies - name: Install mysql-5.6 and dependencies
apt: apt:
name: "{{ item }}" name: "{{ item }}"
install_recommends: yes install_recommends: yes
state: present state: present
with_items: "{{ mysql_debian_pkgs }}" with_items: "{{ mysql_debian_pkgs }}"
- name: Start mysql - name: Start mysql
service: service:
name: mysql name: mysql
state: started state: started
- name: Ensure Anonymous user(s) does not exist - name: Ensure Anonymous user(s) does not exist
mysql_user: mysql_user:
name: '' name: ''
host: "{{ item }}" host: "{{ item }}"
state: absent state: absent
with_items: with_items:
- localhost - localhost
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment