Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
configuration
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
configuration
Commits
bcebcfc8
Commit
bcebcfc8
authored
Dec 30, 2015
by
Ben Patterson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "OPS-241 Ansible: MySql 5.6 installs should remove the 'test' database"
parent
bb4b7a8c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
49 additions
and
37 deletions
+49
-37
playbooks/edx-east/mysql.yml
+0
-6
playbooks/roles/mysql/defaults/main.yml
+3
-2
playbooks/roles/mysql/tasks/main.yml
+29
-29
playbooks/roles/mysql/tasks/remove_mysql_55.yml
+17
-0
No files found.
playbooks/edx-east/mysql.yml
deleted
100644 → 0
View file @
bb4b7a8c
-
name
:
Deploy MySQL
hosts
:
all
sudo
:
True
gather_facts
:
True
roles
:
-
mysql
playbooks/roles/mysql/defaults/main.yml
View file @
bcebcfc8
---
---
mysql_debian_pkgs
:
mysql_debian_pkgs
:
-
software-properties-common
# Note that mysql 5.6 is installed from a non standard PPA in tasks/main.yml
# It is not listed here because of non-standard steps required to install
# mysql 5.6 on 12.04
-
python-mysqldb
-
python-mysqldb
-
mysql-server
playbooks/roles/mysql/tasks/main.yml
View file @
bcebcfc8
...
@@ -3,43 +3,43 @@
...
@@ -3,43 +3,43 @@
# - group_vars/all
# - group_vars/all
# - common/tasks/main.yml
# - common/tasks/main.yml
#
#
# This installs mysql-server-5.6
# This installs mysql-server-5.5 though
# in production we use mysql-5.1.62.
#
# We could install from source instead:
# http://downloads.mysql.com/archives/mysql-5.1/mysql-5.1.62.tar.gz
#
#
---
---
-
name
:
Install PPA for installing MySQL 5.6 on Ubuntu 12.04LTS
# Install PPA for installing MySQL 5.6 on Ubuntu 12.04LTS
-
name
:
install ppa key
apt_key
:
apt_key
:
id
:
E5267A6C
id
=
E5267A6C
url
:
'
{{
COMMON_UBUNTU_APT_KEYSERVER
}}0x14AA40EC0831756756D7F66C4F4EA0AAE5267A6C'
url
=
'{{ COMMON_UBUNTU_APT_KEYSERVER }}0x14AA40EC0831756756D7F66C4F4EA0AAE5267A6C'
state
:
present
state
=
present
-
name
:
install apt repository
-
name
:
install apt repository
apt_repository
:
apt_repository
:
repo
:
'
deb
http://ppa.launchpad.net/ondrej/mysql-5.6/ubuntu
precise
main'
repo
=
'deb http://ppa.launchpad.net/ondrej/mysql-5.6/ubuntu precise main'
update_cache
:
yes
update_cache
=
yes
-
name
:
install mysql 56 and dependencies
-
name
:
look for mysql 5.5
apt
:
shell
:
dpkg -L mysql-server-5.5
name
:
"
{{
item
}}"
ignore_errors
:
true
install_recommends
:
yes
register
:
mysql_55_installed
force
:
yes
state
:
present
with_items
:
mysql_debian_pkgs
-
name
:
Ensure Anonymous user(s) does not exist
-
include
:
remove_mysql_55.yml
mysql_user
:
when
:
mysql_55_installed.rc != 1
name
:
'
'
host
:
"
{{
item
}}"
-
name
:
install mysql 56 and dependencies
state
:
ab
sent
apt
:
pkg={{ item }} install_recommends=yes force=yes state=pre
sent
with_items
:
with_items
:
-
localhost
-
software-properties-common
-
"
{{
ansible_hostname
}}"
-
mysql-server
-
name
:
Remove the test database
-
name
:
install mysql debian packages
mysql_db
:
apt
:
pkg={{ item }} install_recommends=yes state=present
name
:
test
with_items
:
mysql_debian_pkgs
state
:
absent
-
name
:
start mysql
-
name
:
start mysql
service
:
service
:
name=mysql state=started
name
:
mysql
state
:
started
playbooks/roles/mysql/tasks/remove_mysql_55.yml
0 → 100644
View file @
bcebcfc8
---
#
# Tasks for fully removing mysql 5.5 from environments
# conditionally included when 5.5 is installed on the
# target system
#
-
name
:
stop mysql
service
:
name=mysql state=stopped
-
name
:
remove prior version of mysql
apt
:
pkg='{{ item }}' state='absent' purge='yes'
with_items
:
-
mysql-server-5.5
-
mysql-server
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment