1[root@mysql8 playbooks]# pwd
2/usr/local/dbops/mysql_ansible/playbooks
3[root@mysql8 playbooks]# ansible-playbook single_node.yml
4
5PLAY [Deploy single-node MySQL server using binary installation] ************************************************************************************************************************************
6
7TASK [Gathering Facts] ******************************************************************************************************************************************************************************
8ok: [192.168.6.162]
9
10TASK [Check if password meets complexity requirements] **********************************************************************************************************************************************
11ok: [192.168.6.162] => (item=None)
12ok: [192.168.6.162] => (item=None)
13ok: [192.168.6.162] => (item=None)
14ok: [192.168.6.162] => (item=None)
15ok: [192.168.6.162] => (item=None)
16ok: [192.168.6.162] => (item=None)
17ok: [192.168.6.162]
18
19TASK [Print custom error message] *******************************************************************************************************************************************************************
20skipping: [192.168.6.162]
21
22TASK [Validate fcs_ setting are 0 or 1] *************************************************************************************************************************************************************
23skipping: [192.168.6.162] => (item=fcs_skip_db_mount_verification)
24skipping: [192.168.6.162] => (item=fcs_skip_check_ntpd_or_chrony_running)
25skipping: [192.168.6.162] => (item=fcs_auto_download_mysql)
26skipping: [192.168.6.162] => (item=fcs_create_mysql_fast_login)
27skipping: [192.168.6.162] => (item=fcs_backup_script_create_backup_user)
28skipping: [192.168.6.162] => (item=fcs_mysql_use_jemalloc)
29skipping: [192.168.6.162] => (item=fcs_use_greatsql_ha)
30
31TASK [Validate mysql_port is within range] **********************************************************************************************************************************************************
32skipping: [192.168.6.162]
33
34TASK [Validate mysql_version is within range] *******************************************************************************************************************************************************
35skipping: [192.168.6.162]
36
37TASK [Validate mysql_version is within range] *******************************************************************************************************************************************************
38skipping: [192.168.6.162]
39
40TASK [Validate db_type is a valid option] ***********************************************************************************************************************************************************
41skipping: [192.168.6.162]
42
43TASK [Validate server_specs is a valid option] ******************************************************************************************************************************************************
44skipping: [192.168.6.162]
45
46TASK [Check if mysql-8.4.0-linux-glibc2.17-x86_64-minimal.tar.xz exists in ../downloads/ (local)] ***************************************************************************************************
47changed: [192.168.6.162]
48
49TASK [Set the OS type variable] *********************************************************************************************************************************************************************
50ok: [192.168.6.162]
51
52TASK [Print the OS type] ****************************************************************************************************************************************************************************
53ok: [192.168.6.162] => {
54 "msg": "The OS type of host 192.168.6.162 is CentOS7"
55}
56
57TASK [Assert if OS type is supported] ***************************************************************************************************************************************************************
58ok: [192.168.6.162] => {
59 "changed": false,
60 "msg": "All assertions passed"
61}
62
63TASK [Check for Python 3] ***************************************************************************************************************************************************************************
64ok: [192.168.6.162]
65
66TASK [Check for Python 2] ***************************************************************************************************************************************************************************
67ok: [192.168.6.162]
68
69TASK [Set Python interpreter] ***********************************************************************************************************************************************************************
70ok: [192.168.6.162]
71
72TASK [Print the Python interpreter] *****************************************************************************************************************************************************************
73ok: [192.168.6.162] => {
74 "msg": "The Python interpreter of host 192.168.6.162 is /usr/bin/python2"
75}
76
77TASK [Set server_specs_processor_count and server_specs_memtotal_gb based on server_specs] **********************************************************************************************************
78skipping: [192.168.6.162]
79
80TASK [Gen random MySQL server_id] *******************************************************************************************************************************************************************
81ok: [192.168.6.162]
82
83TASK [Collect mysql_server_id to a list on localhost] ***********************************************************************************************************************************************
84ok: [192.168.6.162]
85
86TASK [Check for duplicate mysql_server_id] **********************************************************************************************************************************************************
87ok: [192.168.6.162] => {
88 "changed": false,
89 "msg": "All assertions passed"
90}
91
92TASK [Generate random UUID if mgr_use_random_uuid is set to 1] **************************************************************************************************************************************
93changed: [192.168.6.162]
94
95TASK [set_fact] *************************************************************************************************************************************************************************************
96ok: [192.168.6.162]
97
98TASK [Display the list of target hosts and additional information] **********************************************************************************************************************************
99ok: [192.168.6.162] => {
100 "msg": [
101 "Hosts to be affected by Deploy single-node MySQL server using binary installation: 192.168.6.162",
102 "DB type: mysql",
103 "MySQL port: 3306",
104 "MySQL version: 8.4.0",
105 "Server specs: auto",
106 "Roles to be executed: ../roles/pre_check_and_set, ../roles/mysql_server"
107 ]
108}
109
110TASK [Prompt user for confirmation] *****************************************************************************************************************************************************************
111[Prompt user for confirmation]
112This will perform Deploy single-node MySQL server using binary installation on the displayed hosts. Please type 'confirm' to continue or press Ctrl+C to cancel.:
113ok: [192.168.6.162]
114
115TASK [Check if user confirmed] **********************************************************************************************************************************************************************
116skipping: [192.168.6.162]
117
118TASK [Include role] *********************************************************************************************************************************************************************************
119
120TASK [../roles/pre_check_and_set : Check yum and install libselinux-python3] ************************************************************************************************************************
121ok: [192.168.6.162]
122
123TASK [../roles/pre_check_and_set : Install ncurses-compat-libs if necessary] ************************************************************************************************************************
124skipping: [192.168.6.162]
125
126TASK [../roles/pre_check_and_set : Intall tar for openEuler20] **************************************************************************************************************************************
127ok: [192.168.6.162]
128
129TASK [../roles/pre_check_and_set : Set SeLinux disabled] ********************************************************************************************************************************************
130[WARNING]: SELinux state change will take effect next reboot
131ok: [192.168.6.162]
132
133TASK [../roles/pre_check_and_set : Stop and Disabled Firewalld] *************************************************************************************************************************************
134ok: [192.168.6.162]
135
136TASK [../roles/pre_check_and_set : Gather service facts] ********************************************************************************************************************************************
137skipping: [192.168.6.162]
138
139TASK [../roles/pre_check_and_set : Assert NTP or Chrony is running and only one is enabled] *********************************************************************************************************
140skipping: [192.168.6.162]
141
142TASK [../roles/pre_check_and_set : Check whether NUMA is turned off] ********************************************************************************************************************************
143fatal: [192.168.6.162]: FAILED! => {"changed": false, "cmd": ["grep", "-q", "numa=off", "/proc/cmdline"], "delta": "0:00:00.004868", "end": "2024-08-23 16:07:01.721770", "msg": "non-zero return code", "rc": 1, "start": "2024-08-23 16:07:01.716902", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []}
144...ignoring
145
146TASK [../roles/pre_check_and_set : Show warning if NUMA is not turned off] **************************************************************************************************************************
147ok: [192.168.6.162] => {
148 "msg": "Warning: NUMA is not turned off."
149}
150
151TASK [../roles/pre_check_and_set : Update sysctl configuration file] ********************************************************************************************************************************
152ok: [192.168.6.162]
153
154TASK [../roles/pre_check_and_set : Reload sysctl] ***************************************************************************************************************************************************
155changed: [192.168.6.162]
156
157TASK [../roles/pre_check_and_set : Extract parent directories of mysql_data_dir_base] ***************************************************************************************************************
158skipping: [192.168.6.162]
159
160TASK [../roles/pre_check_and_set : Remove root '/' from parent directories list] ********************************************************************************************************************
161skipping: [192.168.6.162]
162
163TASK [../roles/pre_check_and_set : Check if mount points exist for pre_check_and_set__mysql_data_dir_base_parents list] *****************************************************************************
164skipping: [192.168.6.162]
165
166TASK [../roles/pre_check_and_set : Find the first matching mount point for mysql_data_dir_base and its parents] *************************************************************************************
167skipping: [192.168.6.162] => (item={'block_used': 35061, 'uuid': '3d53107e-ce12-4c21-a78d-82f97fef2750', 'size_total': 1063256064, 'block_total': 259584, 'mount': '/boot', 'block_available': 224523, 'size_available': 919646208, 'fstype': 'xfs', 'inode_total': 524288, 'options': 'rw,seclabel,relatime,attr2,inode64,noquota', 'device': '/dev/sda1', 'inode_used': 326, 'block_size': 4096, 'inode_available': 523962})
168skipping: [192.168.6.162] => (item={'block_used': 4980714, 'uuid': '2020-11-02-15-15-23-00', 'size_total': 10200502272, 'block_total': 4980714, 'mount': '/mnt', 'block_available': 0, 'size_available': 0, 'fstype': 'iso9660', 'inode_total': 0, 'options': 'ro,relatime', 'device': '/dev/sr0', 'inode_used': 0, 'block_size': 2048, 'inode_available': 0})
169skipping: [192.168.6.162] => (item={'block_used': 379986, 'uuid': '3342f530-81a3-43d8-8405-5f4ecb2d6389', 'size_total': 97658605568, 'block_total': 23842433, 'mount': '/', 'block_available': 23462447, 'size_available': 96102182912, 'fstype': 'xfs', 'inode_total': 47708160, 'options': 'rw,seclabel,relatime,attr2,inode64,noquota', 'device': '/dev/mapper/centos-root', 'inode_used': 34255, 'block_size': 4096, 'inode_available': 47673905})
170
171TASK [../roles/pre_check_and_set : Debug output for mount point] ************************************************************************************************************************************
172skipping: [192.168.6.162]
173
174TASK [../roles/pre_check_and_set : Assert mount point is using xfs filesystem] **********************************************************************************************************************
175skipping: [192.168.6.162]
176
177TASK [../roles/pre_check_and_set : If it is a physical machine, double network card binding is required] ********************************************************************************************
178ok: [192.168.6.162] => {
179 "msg": "ens192"
180}
181
182TASK [../roles/pre_check_and_set : If it is a physical machine, double network card binding is required] ********************************************************************************************
183skipping: [192.168.6.162]
184
185TASK [../roles/pre_check_and_set : Add network interface alias to a temporary file] *****************************************************************************************************************
186changed: [192.168.6.162]
187
188TASK [../roles/pre_check_and_set : Fetch copy] ******************************************************************************************************************************************************
189changed: [192.168.6.162]
190
191TASK [../roles/pre_check_and_set : Append file /tmp/net_aliases.txt (delegate to 127.0.0.1)] ********************************************************************************************************
192ok: [192.168.6.162]
193
194TASK [../roles/pre_check_and_set : Check if shell output is 1] **************************************************************************************************************************************
195ok: [192.168.6.162] => {
196 "changed": false,
197 "msg": "All assertions passed"
198}
199
200TASK [../roles/pre_check_and_set : Delete /tmp/net_aliases.txt] *************************************************************************************************************************************
201changed: [192.168.6.162]
202
203TASK [../roles/pre_check_and_set : Delete /tmp/ssh/ (delegate to 127.0.0.1)] ************************************************************************************************************************
204changed: [192.168.6.162]
205
206TASK [../roles/mysql_server : Check if flag exists or not] ******************************************************************************************************************************************
207ok: [192.168.6.162]
208
209TASK [../roles/mysql_server : Fail if flag exists] **************************************************************************************************************************************************
210skipping: [192.168.6.162]
211
212TASK [../roles/mysql_server : Check port not in use —— mysql port 3306] *****************************************************************************************************************************
213ok: [192.168.6.162]
214
215TASK [../roles/mysql_server : Ensure group "mysql" exists] ******************************************************************************************************************************************
216ok: [192.168.6.162]
217
218TASK [../roles/mysql_server : Create mysql user] ****************************************************************************************************************************************************
219changed: [192.168.6.162]
220
221TASK [../roles/mysql_server : Create mysql directories] *********************************************************************************************************************************************
222ok: [192.168.6.162] => (item=/database/mysql/etc)
223ok: [192.168.6.162] => (item=/database/mysql/data)
224ok: [192.168.6.162] => (item=/database/mysql/tmp)
225ok: [192.168.6.162] => (item=/database/mysql/run)
226ok: [192.168.6.162] => (item=/database/mysql/log/binlog)
227ok: [192.168.6.162] => (item=/database/mysql/log/redolog)
228ok: [192.168.6.162] => (item=/database/mysql/log/relaylog)
229ok: [192.168.6.162] => (item=/database/mysql/etc/3306)
230ok: [192.168.6.162] => (item=/database/mysql/data/3306)
231ok: [192.168.6.162] => (item=/database/mysql/tmp/3306)
232ok: [192.168.6.162] => (item=/database/mysql/log/binlog/3306)
233ok: [192.168.6.162] => (item=/database/mysql/log/redolog/3306)
234ok: [192.168.6.162] => (item=/database/mysql/log/relaylog/3306)
235ok: [192.168.6.162] => (item=/database/mysql/base/8.4.0)
236
237TASK [../roles/mysql_server : Config /etc/my.cnf for mysql-5.7.x] ***********************************************************************************************************************************
238skipping: [192.168.6.162]
239
240TASK [../roles/mysql_server : Config /etc/my.cnf for mysql-8.0.x] ***********************************************************************************************************************************
241skipping: [192.168.6.162]
242
243TASK [../roles/mysql_server : Config /etc/my.cnf for mysql-8.4.x] ***********************************************************************************************************************************
244changed: [192.168.6.162]
245
246TASK [../roles/mysql_server : Config /etc/my.cnf for percona-5.7.x] *********************************************************************************************************************************
247skipping: [192.168.6.162]
248
249TASK [../roles/mysql_server : Config /etc/my.cnf for percona-8.0.x] *********************************************************************************************************************************
250skipping: [192.168.6.162]
251
252TASK [../roles/mysql_server : Config /etc/my.cnf for greatsql-5.7.x] ********************************************************************************************************************************
253skipping: [192.168.6.162]
254
255TASK [../roles/mysql_server : Config /etc/my.cnf for greatsql-8.0.x] ********************************************************************************************************************************
256skipping: [192.168.6.162]
257
258TASK [../roles/mysql_server : Install libaio and numactl] *******************************************************************************************************************************************
259ok: [192.168.6.162] => (item={'name': 'libaio'})
260ok: [192.168.6.162] => (item={'name': 'numactl'})
261
262TASK [../roles/mysql_server : Install jemalloc using yum] *******************************************************************************************************************************************
263skipping: [192.168.6.162]
264
265TASK [../roles/mysql_server : Set jemalloc rpm file name based on OS] *******************************************************************************************************************************
266skipping: [192.168.6.162]
267
268TASK [../roles/mysql_server : Copy jemalloc rpm to target server] ***********************************************************************************************************************************
269skipping: [192.168.6.162]
270
271TASK [../roles/mysql_server : Install jemalloc from local file] *************************************************************************************************************************************
272skipping: [192.168.6.162]
273
274TASK [../roles/mysql_server : Check if jemalloc installation failed] ********************************************************************************************************************************
275skipping: [192.168.6.162]
276
277TASK [../roles/mysql_server : Check if MySQL package exists locally(local)] *************************************************************************************************************************
278ok: [192.168.6.162]
279
280TASK [../roles/mysql_server : Fail if MySQL package not found and auto download is disabled(local)] *************************************************************************************************
281skipping: [192.168.6.162]
282
283TASK [../roles/mysql_server : Download MySQL binary tarball if not found locally and auto download is enabled(local)] *******************************************************************************
284skipping: [192.168.6.162]
285
286TASK [../roles/mysql_server : Download GreatSQL binary tarball if not found locally and auto download is enabled(local)] ****************************************************************************
287skipping: [192.168.6.162]
288
289TASK [../roles/mysql_server : Transfer MySQL install package to remote host] ************************************************************************************************************************
290changed: [192.168.6.162]
291
292TASK [../roles/mysql_server : Unarchive MySQL install package to /database/mysql/base/8.4.0] ********************************************************************************************************
293changed: [192.168.6.162]
294
295TASK [../roles/mysql_server : Touch unarchive_mysql_package_finished file] **************************************************************************************************************************
296changed: [192.168.6.162]
297
298TASK [../roles/mysql_server : Change owner to mysql user] *******************************************************************************************************************************************
299changed: [192.168.6.162]
300
301TASK [../roles/mysql_server : Make link /database/mysql/mysql-xx.yy.gz to /usr/local/mysql] *********************************************************************************************************
302changed: [192.168.6.162]
303
304TASK [../roles/mysql_server : Export mysql share object (*.os)] *************************************************************************************************************************************
305changed: [192.168.6.162]
306
307TASK [../roles/mysql_server : Load share object] ****************************************************************************************************************************************************
308ok: [192.168.6.162]
309
310TASK [../roles/mysql_server : Export path env variable] *********************************************************************************************************************************************
311changed: [192.168.6.162]
312
313TASK [../roles/mysql_server : Export path env to /root/.bashrc] *************************************************************************************************************************************
314changed: [192.168.6.162]
315
316TASK [../roles/mysql_server : Export path env to /home/mysql/.bashrc] *******************************************************************************************************************************
317changed: [192.168.6.162]
318
319TASK [../roles/mysql_server : Remove /usr/include/mysql] ********************************************************************************************************************************************
320ok: [192.168.6.162]
321
322TASK [../roles/mysql_server : Export include file to /usr/include/mysql] ****************************************************************************************************************************
323changed: [192.168.6.162]
324
325TASK [../roles/mysql_server : Create symbolic links for libssl.so and libcrypto.so] *****************************************************************************************************************
326skipping: [192.168.6.162] => (item={'src': 'libssl.so.10', 'dest': 'libssl.so'})
327skipping: [192.168.6.162] => (item={'src': 'libcrypto.so.10', 'dest': 'libcrypto.so'})
328
329TASK [../roles/mysql_server : Initialize-insecure for mysql-5.7.x] **********************************************************************************************************************************
330skipping: [192.168.6.162]
331
332TASK [../roles/mysql_server : Initialize-insecure for mysql-8.0.x or mysql-8.4.x] *******************************************************************************************************************
333changed: [192.168.6.162]
334
335TASK [../roles/mysql_server : Create systemd config file] *******************************************************************************************************************************************
336changed: [192.168.6.162]
337
338TASK [../roles/mysql_server : Start mysql(sytemctl)] ************************************************************************************************************************************************
339changed: [192.168.6.162]
340
341TASK [../roles/mysql_server : Config mysql.service start up on boot] ********************************************************************************************************************************
342changed: [192.168.6.162]
343
344TASK [../roles/mysql_server : Mysql status] *********************************************************************************************************************************************************
345ok: [192.168.6.162]
346
347TASK [../roles/mysql_server : Transfer sql statement to remote] *************************************************************************************************************************************
348changed: [192.168.6.162]
349
350TASK [../roles/mysql_server : Make mysql secure] ****************************************************************************************************************************************************
351changed: [192.168.6.162]
352
353TASK [../roles/mysql_server : Remove temp file /tmp/make_mysql_secure.sql] **************************************************************************************************************************
354changed: [192.168.6.162]
355
356TASK [../roles/mysql_server : Ensure expect is installed] *******************************************************************************************************************************************
357changed: [192.168.6.162]
358
359TASK [../roles/mysql_server : Transfer expect script to remote host] ********************************************************************************************************************************
360changed: [192.168.6.162]
361
362TASK [../roles/mysql_server : Execute expect script to set MySQL login-path] ************************************************************************************************************************
363[WARNING]: Module remote_tmp /home/mysql/.ansible/tmp did not exist and was created with a mode of 0700, this may cause issues when running as another user. To avoid this, create the remote_tmp
364dir with the correct permissions manually
365ok: [192.168.6.162]
366
367TASK [../roles/mysql_server : Set up alias in .bashrc named —— db3306] ******************************************************************************************************************************
368changed: [192.168.6.162]
369
370TASK [../roles/mysql_server : Remove expect script from remote host] ********************************************************************************************************************************
371changed: [192.168.6.162]
372
373TASK [../roles/mysql_server : Touch single_finish.flag] *********************************************************************************************************************************************
374changed: [192.168.6.162]
375
376PLAY RECAP ******************************************************************************************************************************************************************************************
377192.168.6.162 : ok=66 changed=31 unreachable=0 failed=0 skipped=36 rescued=0 ignored=1
378
379Playbook run took 0 days, 0 hours, 1 minutes, 42 seconds