1、搭建nfs存储[root@docker-k8s01~]#yum-yinstallnfs-utils[root@docker-k8s01~]#mkdir/nfsdata/mysql-p[root@docker-k8s01~]#cat/etc/exports/nfsdata*(rw,sync,no_root_squash)[root@docker-k8s01~]#systemctlrestartn
分类:
数据库 时间:
2020-09-17 21:31:33
阅读次数:
60
服务类的Pod容器:RC、RS、DS、Deployment.(Pod内运行的服务,要持续运行)工作类的Pod容器:Job--->执行一次,或者批量执行处理程序,完成之退出容器。//举个栗子kind:JobapiVersion:batch/v1metadata:name:test-jobspec:template:metadata:name:test-jobspec:containers:-n
分类:
其他好文 时间:
2020-09-17 18:40:08
阅读次数:
35
内置变量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
Home.vue <template> <!-- 所有的内容要被根节点包含起来 --> <div id="home"> <v-header ref="header"></v-header> <hr> 首页组件 <button @click="getChildData()">获取子组件的数据和方法</ ...
分类:
其他好文 时间:
2020-09-17 16:18:13
阅读次数:
24
app.vue <template> <div id="app"> <v-home></v-home> <br> <hr> <br> <v-news></v-news> </div> </template> <script> /*非父子组件传值 1、新建一个js文件 然后引入vue 实例化vue 最 ...
分类:
其他好文 时间:
2020-09-17 16:17:19
阅读次数:
28