Execution
Date 06 Sep 2024 06:47:53 +0100
Duration 00:00:34.06
Controller ssh-gw-4.layershift.com
User root
Versions
Ansible 2.16.4
ara 1.7.1 / 1.7.1
Python 3.10.10
Summary
134 Hosts
1 Tasks
134 Results
1 Plays
1 Files
0 Records

Task result details


Field Value
changed
True
cmd
cat /etc/logrotate.d/mysql
delta
0:00:00.005652
end
2024-09-06 06:48:07.623186
invocation
{
    "module_args": {
        "_raw_params": "cat /etc/logrotate.d/mysql",
        "_uses_shell": true,
        "argv": null,
        "chdir": null,
        "creates": null,
        "executable": null,
        "expand_argument_vars": true,
        "removes": null,
        "stdin": null,
        "stdin_add_newline": true,
        "strip_empty_ends": true
    }
}
msg

rc
0
start
2024-09-06 06:48:07.617534
stderr

stderr_lines
[]
stdout
# This logname can be set in /etc/my.cnf
# by setting the variable "log-error"
# in the [mysqld] section as follows:
#
# [mysqld]
# log-error=/var/lib/mysql/mysqld.log
#
# If the root user has a password you have to create a
# /root/.my.cnf configuration file with the following
# content:
#
# [mysqladmin]
# password = <secret> 
# user= root
#
# where "<secret>" is the password. 
#
# ATTENTION: This /root/.my.cnf should be readable ONLY
# for root !

/var/lib/mysql/mysqld.log {
        # create 600 mysql mysql
        su mysql mysql
        notifempty
        daily
        rotate 3
        missingok
        compress
    postrotate
	# just if mariadbd is really running
	if test -x /usr/bin/mysqladmin && \
	   /usr/bin/mysqladmin ping &>/dev/null
	then
	   /usr/bin/mysqladmin --local flush-error-log \
              flush-engine-log flush-general-log flush-slow-log
	fi
    endscript
}
stdout_lines
[
    "# This logname can be set in /etc/my.cnf",
    "# by setting the variable \"log-error\"",
    "# in the [mysqld] section as follows:",
    "#",
    "# [mysqld]",
    "# log-error=/var/lib/mysql/mysqld.log",
    "#",
    "# If the root user has a password you have to create a",
    "# /root/.my.cnf configuration file with the following",
    "# content:",
    "#",
    "# [mysqladmin]",
    "# password = <secret> ",
    "# user= root",
    "#",
    "# where \"<secret>\" is the password. ",
    "#",
    "# ATTENTION: This /root/.my.cnf should be readable ONLY",
    "# for root !",
    "",
    "/var/lib/mysql/mysqld.log {",
    "        # create 600 mysql mysql",
    "        su mysql mysql",
    "        notifempty",
    "        daily",
    "        rotate 3",
    "        missingok",
    "        compress",
    "    postrotate",
    "\t# just if mariadbd is really running",
    "\tif test -x /usr/bin/mysqladmin && \\",
    "\t   /usr/bin/mysqladmin ping &>/dev/null",
    "\tthen",
    "\t   /usr/bin/mysqladmin --local flush-error-log \\",
    "              flush-engine-log flush-general-log flush-slow-log",
    "\tfi",
    "    endscript",
    "}"
]