上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 20 下一页
摘要: 支持 字典格式、列表格式。定义和引用完全兼容python格式 {"ip": "127.0.0.1","port": "8000"} [{"ip": "127.0.0.1"},{"port": "8000"}] ["bind":{"ip": "127.0.0.1"},{"port": "8000"}] 阅读全文
posted @ 2023-01-19 09:16 mingtian是吧 阅读(49) 评论(0) 推荐(0)
摘要: tags 可以给tasks打标签,之后按照标签有选择的执行任务 - hosts: 127.0.0.1 tasks: - name: mkdir tags: - mkdir1 file: path: /tmp/testdir/1 state: directory recurse: yes owner: 阅读全文
posted @ 2023-01-18 09:18 mingtian是吧 阅读(21) 评论(0) 推荐(0)
摘要: 第一种类型 - hosts: 127.0.0.1 tasks: - name: mkdir file: path: /tmp/testdir/1 state: directory recurse: yes owner: test - name: touch file: path: /tmp/test 阅读全文
posted @ 2023-01-17 09:13 mingtian是吧 阅读(26) 评论(0) 推荐(0)
摘要: - hosts: all tasks: - name: ping test ping: - name: from remote host copy file fetch: src: /etc/hosts dest: . owner: root mode: 0600 - hosts: 127.0.0. 阅读全文
posted @ 2023-01-17 09:03 mingtian是吧 阅读(53) 评论(0) 推荐(0)
摘要: ##### ping ```bash ansible all -m ping ``` ##### fetch ```bash # ansible-doc -s fetch 从远端拉取文件 ansible 127.0.0.1 -m fetch -a "src=/etc/hosts dest=/tmp 阅读全文
posted @ 2023-01-16 17:12 mingtian是吧 阅读(23) 评论(0) 推荐(0)
摘要: 默认管理清单文件 /etc/ansible/hosts 可以在配置清单中配置 主机变量 群组变量 # /etc/ansible/hosts [master] 55.3.139.9 var='master01' 55.3.139.1[0:1] [node] qhnosqlnode[1:15] [k8s 阅读全文
posted @ 2023-01-16 16:39 mingtian是吧 阅读(32) 评论(0) 推荐(0)
摘要: 主机环境CentOS Linux release 7.6.1810 (Core) yum install epel-release yum install ansible -y ansible 127.0.0.1 -m ping 127.0.0.1 | SUCCESS => { "ansible_f 阅读全文
posted @ 2023-01-16 16:28 mingtian是吧 阅读(30) 评论(0) 推荐(0)
摘要: cat>>/etc/profile<<EOF export JAVA_HOME=/tools/jdk-11.0.2 export JAVA_JRE=$JAVA_HOME/jre export CLASSPATH=$JAVA_HOME/lib:$JAVA_HOME/jre/lib:. export P 阅读全文
posted @ 2023-01-15 20:50 mingtian是吧 阅读(21) 评论(0) 推荐(0)
摘要: cri container runtime interface --> docker containerd oci open container interfac 实现了cri 与操作系统的联动 cni container network interface csi container storag 阅读全文
posted @ 2023-01-09 09:22 mingtian是吧 阅读(62) 评论(0) 推荐(0)
摘要: 创建被调用的包 mkdir test cd test go mod init example.com/test cat test/test.go package test import "fmt" // func 定义函数 // Hello 函数名 // (name string) 可以接受一个字符 阅读全文
posted @ 2022-12-08 23:03 mingtian是吧 阅读(20) 评论(0) 推荐(0)
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 20 下一页