码迷,mamicode.com
首页 >  
搜索关键字:ansible ssh    ( 18702个结果
ansible的内置变量
内置变量ansible_version获取到ansible的版本号ansibletest70-mdebug-a"msg={{ansible_version}}"内置变量hostvars操作当前主机时获取到其他主机中的信息name:"play1:Gatherfactsoftest71"hosts:test71remote_user:rootname:"
分类:其他好文   时间:2020-09-17 17:20:47    阅读次数:79
ansible进阶循环
通过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
ansible的循环二
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
ansible循环四
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
ansible循环四
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
ansible循环三
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
安装Oracle 19c RAC创建ssh连接成功,测试报错INS-06006
两个节点分别执行 1.su - grid 2.cd $HOME/.ssh 3.rm -rf * 4.图形化界面重新setup 5.test成功 参考链接:https://blog.csdn.net/tan88881111/article/details/80407620 参考文档: Clean up ...
分类:数据库   时间:2020-09-17 16:31:20    阅读次数:69
ansible模块register/vars
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
DC-1靶机
第一次练习vlunhub的靶机,学到了很多知识,记一下 在官网下载后导入Oracle VM VirtualBox虚拟机,靶机使用侨连桥接我的无线网卡,kali也是, 两个虚拟机在同一网段下,可以使用nmap扫描网段发现dc1的IP,也可以用arp-scan、netdiscover等,我用的是arp- ...
分类:其他好文   时间:2020-09-17 13:35:57    阅读次数:28
CentOS6.x开启ssh服务
如果ssh没有安装,就使用如下命令安装yuminstallopenssh-serverssh服务的配置文件为/etc/ssh/sshd_config设置开机启动如果开启了防火墙,还需要在防火墙上放行,如果修改了22端口,也需要在防火墙放行iptables-IINPUT-ptcp--dport22-jACCEPT没有的话放行22端口
分类:其他好文   时间:2020-09-17 13:12:33    阅读次数:51
18702条   上一页 1 ... 32 33 34 35 36 ... 1871 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!