上一页 1 ··· 7 8 9 10 11 12 下一页
摘要: file.managed模块的使用示例: 1.在/etc/salt/master中编辑 file_roots: base: - /srv/salt dev: - /srv/salt/dev test: - /srv/salt/test prod: - /srv/salt/prod 2.在/srv/s 阅读全文
posted @ 2016-05-11 17:34 Alex0425 阅读(798) 评论(0) 推荐(0) 编辑
摘要: def match(pattern, string, flags=0): """Try to apply the pattern at the start of the string, returning a match object, or None if no match was found." 阅读全文
posted @ 2016-05-11 01:43 Alex0425 阅读(167) 评论(0) 推荐(0) 编辑
摘要: Array = [[1,2,3,4],[5,6,7,8],[9,10,11,12],[13,14,15,16]]print (Array)for i in range(len(Array)): for j in range(i,len(Array[i])): tmp = Array[i][j] Ar 阅读全文
posted @ 2016-05-09 18:02 Alex0425 阅读(808) 评论(0) 推荐(0) 编辑
摘要: [root@ndsfront12 ~]# salt '*' test.pingndsfront21: Truendsfront12: True '*'服务器主机名 cmd模块 run方法 [root@ndsfront12 ~]# salt '*' cmd.run 'df -h'ndsfront21: 阅读全文
posted @ 2016-05-09 10:46 Alex0425 阅读(215) 评论(0) 推荐(0) 编辑
摘要: SaltStack启动&添加自启动 /etc/init.d/salt-master start /etc/init.d/salt-minion start chkconfig salt-master on chkconfig salt-minion on service salt-master st 阅读全文
posted @ 2016-05-09 10:18 Alex0425 阅读(130) 评论(0) 推荐(0) 编辑
摘要: SaltStack基础管理平台 Salt-master启动时会启动两个端口: 4505:salt的消息发布专用端口 4506:客户端与服务端通讯的端口 SaltStack离线安装: 1.需要安装 yum install yum-downloadonly(用于下载离线文件,下载好的离线文件放在指定目录 阅读全文
posted @ 2016-05-07 01:04 Alex0425 阅读(381) 评论(0) 推荐(0) 编辑
摘要: welcome to loginwelcome [Alex] to tv page 结论:1.先定义一个login函数,形参为函数的地址,返回值也为函数地址。 welcome to loginwelcome [Alex] to tv page 结论:这里的@login等同于tv = login(tv 阅读全文
posted @ 2016-05-06 02:02 Alex0425 阅读(180) 评论(0) 推荐(0) 编辑
摘要: A consumer one productB consumer one productbegin to make baozimake two baozibaozi[0] bei [A] chilebaozi[0] bei [B] chilemake two baozibaozi[1] bei [A 阅读全文
posted @ 2016-05-05 22:51 Alex0425 阅读(209) 评论(0) 推荐(0) 编辑
摘要: 1 1 2 3 5 Traceback (most recent call last): File "D:/Python/day3/Test.py", line 20, in <module> print (f.__next__()) StopIteration 查看另外一个例子“ 1 first 阅读全文
posted @ 2016-05-05 00:33 Alex0425 阅读(188) 评论(0) 推荐(0) 编辑
摘要: <class 'list'> [11, 22, 33, 44] <class 'dict'> {'k2': 'v2', 'k1': 'v1'} 结论:json可以将字符串格式化为相应的数据类型 阅读全文
posted @ 2016-05-03 20:36 Alex0425 阅读(183) 评论(0) 推荐(0) 编辑
上一页 1 ··· 7 8 9 10 11 12 下一页