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
97bd110b
Commit
97bd110b
authored
Jan 29, 2016
by
arbabnazar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
OPS-1278 Create role to install MySQL locally that is not experimental
parent
e38e8747
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
44 additions
and
35 deletions
+44
-35
playbooks/roles/mysql/meta/main.yml
+1
-1
playbooks/roles/mysql/tasks/main.yml
+7
-34
playbooks/roles/mysql/tasks/mysql.yml
+36
-0
No files found.
playbooks/roles/mysql/meta/main.yml
View file @
97bd110b
---
dependencies
:
-
common
-
common
_vars
playbooks/roles/mysql/tasks/main.yml
View file @
97bd110b
---
-
name
:
Add MySQL community apt key
apt_key
:
id
:
8C718D3B5072E1F5
keyserver
:
"
{{
COMMON_EDX_PPA_KEY_SERVER
}}"
state
:
present
-
name
:
Look for mysql 5.6
shell
:
dpkg -L mysql-server-5.6
ignore_errors
:
yes
register
:
mysql_56_installed
-
name
:
Install MySQL community apt repositories
apt_repository
:
repo
:
"
{{
item
}}"
update_cache
:
yes
with_items
:
-
"
deb
http://repo.mysql.com/apt/ubuntu/
precise
mysql-5.6"
-
"
deb-src
http://repo.mysql.com/apt/ubuntu/
precise
mysql-5.6"
-
name
:
Install mysql-5.6 and dependencies
apt
:
name
:
"
{{
item
}}"
install_recommends
:
yes
update_cache
:
yes
state
:
present
with_items
:
mysql_debian_pkgs
-
name
:
Start mysql
service
:
name
:
mysql
state
:
started
-
name
:
Ensure Anonymous user(s) does not exist
mysql_user
:
name
:
'
'
host
:
"
{{
item
}}"
state
:
absent
with_items
:
-
localhost
-
"
{{
ansible_hostname
}}"
-
include
:
mysql.yml
when
:
mysql_56_installed.rc == 1
\ No newline at end of file
playbooks/roles/mysql/tasks/mysql.yml
0 → 100644
View file @
97bd110b
---
-
name
:
Add MySQL community apt key
apt_key
:
id
:
8C718D3B5072E1F5
keyserver
:
"
{{
COMMON_EDX_PPA_KEY_SERVER
}}"
state
:
present
-
name
:
Install MySQL community apt repositories
apt_repository
:
repo
:
"
{{
item
}}"
update_cache
:
yes
with_items
:
-
"
deb
http://repo.mysql.com/apt/ubuntu/
precise
mysql-5.6"
-
"
deb-src
http://repo.mysql.com/apt/ubuntu/
precise
mysql-5.6"
-
name
:
Install mysql-5.6 and dependencies
apt
:
name
:
"
{{
item
}}"
install_recommends
:
yes
update_cache
:
yes
state
:
present
with_items
:
mysql_debian_pkgs
-
name
:
Start mysql
service
:
name
:
mysql
state
:
started
-
name
:
Ensure Anonymous user(s) does not exist
mysql_user
:
name
:
'
'
host
:
"
{{
item
}}"
state
:
absent
with_items
:
-
localhost
-
"
{{
ansible_hostname
}}"
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