Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
HPCasCode
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hpc-team
HPCasCode
Commits
4207d720
Commit
4207d720
authored
5 years ago
by
Chris Hines
Browse files
Options
Downloads
Patches
Plain Diff
don't change mysql on this branch
Former-commit-id:
90a6f120
parent
b9699836
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
roles/mysql/tasks/mysql_server.yml
+12
-17
12 additions, 17 deletions
roles/mysql/tasks/mysql_server.yml
with
12 additions
and
17 deletions
roles/mysql/tasks/mysql_server.yml
+
12
−
17
View file @
4207d720
...
@@ -10,29 +10,24 @@
...
@@ -10,29 +10,24 @@
with_items
:
"
{{
server_packages
}}"
with_items
:
"
{{
server_packages
}}"
sudo
:
true
sudo
:
true
when
:
ansible_os_family == "RedHat"
when
:
ansible_os_family == "RedHat"
-
name
:
make sure mysql conf directory exists
file
:
dest=/etc/mysql/conf.d state=directory
sudo
:
true
register
:
mysqldb_confdir_create
-
name
:
"
Starting
MySQL"
-
name
:
"
Starting
MySQL"
service
:
name={{ sqlServiceName }} state=started enabled=true
service
:
name={{ sqlServiceName }} state=started enabled=true
sudo
:
true
sudo
:
true
#- name: "Adding root"
-
name
:
make sure mysql conf directory exists
# sudo: true
file
:
dest=/etc/mysql/conf.d state=directory
# mysql_user: name=root host="{{ item }}" password="{{ mysql_root_password }}" login_user=root login_password="{{ mysql_root_password }}" check_implicit_admin=yes
sudo
:
true
# with_items:
# - "{{ ansible_hostname }}"
-
name
:
"
Adding
root"
# - 127.0.0.1
sudo
:
true
# - ::1
mysql_user
:
name=root host="{{ item }}" password="{{ mysql_root_password }}" login_user=root login_password="{{ mysql_root_password }}" check_implicit_admin=yes
# - localhost
with_items
:
-
"
{{
ansible_hostname
}}"
-
127.0.0.1
-
::1
-
localhost
-
name
:
update mysql root password for all root accounts
# this will only work if a completely fresh db gets installed because it gets shipped with a blank root pw
mysql_user
:
name=root host=localhost password={{ mysql_root_password }} login_user=root
when
:
mysqldb_confdir_create.changed
-
name
:
"
Adding
user
database"
-
name
:
"
Adding
user
database"
mysql_db
:
name={{ mysql_user_db_name }} state=present login_user=root login_password={{ mysql_root_password }}
mysql_db
:
name={{ mysql_user_db_name }} state=present login_user=root login_password={{ mysql_root_password }}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment