Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
joohanhong
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
JooHan Hong
joohanhong
Commits
c0e348b3
Commit
c0e348b3
authored
Mar 10, 2021
by
JooHan Hong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mariadb, modify
parent
f1a27ae3
Pipeline
#5137
passed with stages
in 2 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
11 deletions
+37
-11
README.md
ANSIBLE/DBMS/MariaDB/README.md
+37
-11
No files found.
ANSIBLE/DBMS/MariaDB/README.md
View file @
c0e348b3
...
...
@@ -7,8 +7,8 @@
## 주요 기능
-
templates/
resolv.conf.j2 파일을 이용해 변수에 맞게 DNS Resolver 설정을 수행할 수 있
다.
-
DNS Resolver는 설정즉시 반영되기 때문에 설정 후 dig 명령을 통해 제대로 Resolving 되는 지 확인
한다.
-
templates/
my.cnf.j2 Jinja2 템플릿을 사용하여, server_id,innodb_buffer_pool_size를 조정한
다.
-
OS 별 MariaDB 패키지를 취사선택(Facts 변수)하여 설치
한다.
## Inventory 설정
...
...
@@ -50,25 +50,44 @@ ansible_python_interpreter: python2.7
buffer_pool_size: "65535MB"
mysql_conf_src: "/etc/mysql_src"
tasks:
-
name: Basic apt sources.list file Backup
command: cp -rf /etc/apt/sources.list /etc/apt/sources.list_src
when: sources_list_src is not exists
-
name: APT sources.list file copy
copy:
src: "{{ item }}"
dest: /etc/apt/sources.list.d
owner: 'root'
group: 'root'
mode: 0644
#attr: i
with_items:
[
'MariaDB'
]
when: ansible_os_family == "Debian"
-
name:
APT source sources.list
file copy
-
name:
YUM repo
file copy
copy:
src: "{{ item }}"
dest: /etc/
apt/sources.list
dest: /etc/
yum.repos.d
owner: 'root'
group: 'root'
mode: 0644
#attr: i
with_items:
[
'sources.list'
]
[
'MariaDB.repo'
]
when: ansible_os_family == "CentOS"
-
name: MariaDB 10.3 Installing
-
name: MariaDB 10.3 Installing
(APT)
apt:
pkg:
-
mariadb-server=10.3
when: ansible_os_family == "Debian"
-
name: MariaDB 10.3 Installing (YUM)
yum:
name: {{ item }}
with_items:
-
MariaDB
-
MariaDB-server
-
MariaDB-client
when: ansible_os_family == "CentOS"
-
name: MariaDB Basic Setting
command: cp -rfp /etc/mysql /etc/mysql_src
...
...
@@ -86,6 +105,7 @@ ansible_python_interpreter: python2.7
-
{ src: mysql_config/mariadb.cnf, dest: /etc/mysql/conf.d/mariadb.cnf }
-
{ src: mysql_config/mysqld_safe_syslog.cnf, dest: /etc/mysql/conf.d/mysqld_safe_syslog.cnf }
-
{ src: mysql_config/tokudb.cnf, dest: /etc/mysql/conf.d/tokudb.cnf }
when: ansible_os_family == "Debian"
-
name: mysql config files permission set
file:
...
...
@@ -97,9 +117,15 @@ ansible_python_interpreter: python2.7
-
{ path: /etc/mysql/conf.d/mariadb.cnf, mode: 644 }
-
{ path: /etc/mysql/conf.d/mysqld_safe_syslog.cnf, mode: 644 }
-
{ path: /etc/mysql/conf.d/tokudb.cnf, mode: 644 }
when: ansible_os_family == "Debian"
-
name:
ntp.co
nf configuration
-
name:
my.c
nf configuration
template: src=templates/my.cnf.j2 dest=/etc/mysql/my.cnf mode=0644
when: ansible_os_family == "Debian"
-
name: my.cnf configuration
template: src=templates/my.cnf.j2 dest=/etc/my.cnf mode=0644
when: ansible_os_family == "CentOS"
-
name: mysqld Daemon Restart
systemd:
...
...
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