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
5218e2de
Commit
5218e2de
authored
Nov 20, 2013
by
Jason Bau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add tasks that create phpmyadmin control role
parent
7d48bcab
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
54 additions
and
2 deletions
+54
-2
playbooks/roles/php/defaults/main.yml
+2
-0
playbooks/roles/php/tasks/phpmyadmin.yml
+52
-2
No files found.
playbooks/roles/php/defaults/main.yml
View file @
5218e2de
...
...
@@ -7,6 +7,8 @@ FPM_LISTENER: "127.0.0.1:19010"
INSTALL_PHPMYADMIN
:
true
MYSQL_SERVER_HOST
:
'
127.0.0.1'
MYSQL_SERVER_PORT
:
3307
MYSQL_SERVER_USER
:
'
root'
# used only to create the PHPMYADMIN_CONTROL_USER
MYSQL_SERVER_PASS
:
'
'
# used only to create the PHPMYADMIN_CONTROL_USER
PHPMYADMIN_DBS_SHOWN
:
-
'
edxapp'
...
...
playbooks/roles/php/tasks/phpmyadmin.yml
View file @
5218e2de
# Installs PHPMYADMIN
---
-
name
:
installs phpmyadmin
apt
:
pkg=phpmyadmin state=present
-
name
:
installs phpmyadmin
(and python-mysqldb for later ansible tasks)
apt
:
pkg=phpmyadmin
,python-mysqldb
state=present
tags
:
-
php
-
phpmyadmin
...
...
@@ -33,3 +33,53 @@
-
php
-
phpmyadmin
-
name
:
create phpmyadmin mysql conf user
mysql_user
:
>
login_host={{ MYSQL_SERVER_HOST }}
login_user={{ MYSQL_SERVER_USER }} login_password={{ MYSQL_SERVER_PASS }}
name={{ PHPMYADMIN_CONTROLUSER }} password={{ PHPMYADMIN_CONTROLPASS }}
state=present
tags
:
-
php
-
phpmyadmin
-
name
:
unzip db creation script that creates phpmyadmin db (so we can manipulate it)
command
:
gunzip /usr/share/doc/phpmyadmin/examples/create_tables.sql.gz
ignore_errors
:
true
tags
:
-
php
-
phpmyadmin
-
name
:
write desired phpmyadmin db to script
lineinfile
:
>
dest=/usr/share/doc/phpmyadmin/examples/create_tables.sql
regexp="^CREATE DATABASE IF NOT EXISTS.*$"
line="CREATE DATABASE IF NOT EXISTS `{{ PHPMYADIN_PMADB }}`"
tags
:
-
php
-
phpmyadmin
-
name
:
use desired phpmyadmin db in script
lineinfile
:
>
dest=/usr/share/doc/phpmyadmin/examples/create_tables.sql
regexp="^USE.*$"
line="USE `{{ PHPMYADIN_PMADB }}`;"
tags
:
-
php
-
phpmyadmin
-
name
:
run db creation script (creates phpmyadmin db)
shell
:
"
mysql
-h
{{
MYSQL_SERVER_HOST
}}
-P
{{
MYSQL_SERVER_PORT
}}
-u{{
MYSQL_SERVER_USER
}}
-p{{
MYSQL_SERVER_PASS
}}
<
/usr/share/doc/phpmyadmin/examples/create_tables.sql"
tags
:
-
php
-
phpmyadmin
-
name
:
grant all on phpmyadin database to control user
mysql_user
:
>
login_host={{ MYSQL_SERVER_HOST }}
login_user={{ MYSQL_SERVER_USER }} login_password={{ MYSQL_SERVER_PASS }}
name={{ PHPMYADMIN_CONTROLUSER }}
priv={{ PHPMYADIN_PMADB }}.*:ALL
tags
:
-
php
-
phpmyadmin
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