# 安装 Mysql 8.0.19下载 MySQL Community Server 8.0.19 【Compressed TAR Archive】(mysql-8.0.19-linux-glibc2.12-x86_64.tar.xz)1) 解压并移动(注意不要修改解压到的地址),cd到~/Down ...
分类:
数据库 时间:
2020-09-17 18:06:58
阅读次数:
54
内置变量ansible_version获取到ansible的版本号ansibletest70-mdebug-a"msg={{ansible_version}}"内置变量hostvars操作当前主机时获取到其他主机中的信息name:"play1:Gatherfactsoftest71"hosts:test71remote_user:rootname:"
分类:
其他好文 时间:
2020-09-17 17:20:47
阅读次数:
79
通过item和with_items对重复操作进行循环执行示例:hosts:jack6_1remote_user:rootgather_facts:notasks:name:touchfilefile:path:"{{item}}"state:touchwith_items:"a""b""c"在jack6_1主机上创建三
分类:
其他好文 时间:
2020-09-17 17:20:16
阅读次数:
39
with_items遍历列表中每个元素,包括嵌套列表with_list将嵌套列表作为整体元素遍历with_together将多个列表中的子列表元素,一起输出,不成对则null补位示例:hosts:jack6_1remote_user:rootgather_facts:notasks:debug:msg:"{{item}}"with_items:[1,2,3][a,b]debug
分类:
其他好文 时间:
2020-09-17 17:19:57
阅读次数:
31
with_indexed_items示例:hosts:jack6_1remote_user:rootgather_facts:notasks:debug:msg:"{{item}}"with_indexed_items:[t1,t2][t3,[t4,t5]][t6]输出结果如下:[root@jack7-1work]#ansible-playbook--syntax-checki
分类:
其他好文 时间:
2020-09-17 17:19:41
阅读次数:
32
with_indexed_items示例:hosts:jack6_1remote_user:rootgather_facts:notasks:debug:msg:"{{item}}"with_indexed_items:[t1,t2][t3,[t4,t5]][t6]输出结果如下:[root@jack7-1work]#ansible-playbook--syntax-checki
分类:
其他好文 时间:
2020-09-17 17:19:20
阅读次数:
33
with_nested采用笛卡尔乘积方式,将多个嵌套列表中的元素交叉组合示例:创建多个目录及子目录mkdir-p/testdir/{a,b,c}/{1,2}ansible剧本如下:hosts:jack6_1remote_user:rootgather_facts:notasks:file:path:"/testdir"state:directoryfile:path:"
分类:
其他好文 时间:
2020-09-17 16:54:16
阅读次数:
24
register注册变量可以将输出信息作为变量值示例:[root@jack7-1work]#catregister.ymlhosts:PCremote_user:roottasks:name:testshellshell:"echotest>/root/test"register:testvar==================>将shell输出的结果赋值给tes
分类:
其他好文 时间:
2020-09-17 16:02:37
阅读次数:
28
1 下载 解压 下完完成之后解压 如 解压后的位置G:\database_soft\mysql-8.0.21-winx64 2 配置环境变量 3 设置配置文件 在安装mysql的bin目录下 新建my-default.ini 其中注意两点 mysql的安装目录 mysql数据库的数据的存放目录 [m ...
分类:
数据库 时间:
2020-09-17 15:55:44
阅读次数:
37
1.查找镜像: docker search mysql 也可以去官网查看镜像tag,选择自己需要的版本,否则会下载最新版本:https://hub.docker.com/_/mysql/ 2.下载镜像(如上一步,可以指定想要的版本,不指定则为最新版): docker pull mysql 3.通过镜 ...
分类:
数据库 时间:
2020-09-17 13:51:00
阅读次数:
35