Grains基础:
• Grains是saltstack最重要的组件之一
• 存储minion端的基本信息,这些信息一般都是静态的,如CPU、内核、操作系统等
• Grains存储在minion本地
• 管理员可以在minion端进行grains值的修改,如增加、删除等

Grains基础应用
应用一: 获取minion端所有grains信息
        # salt '随便一台主机名' grains.items  相当于python字典的items() 列出key value
        #salt '随便一台主机名' grains.ls  只列出key
        #salt '随便一台主机名' grains.get saltversion  获取某个key的value  
        • 通过grains.item获取minion端的fqdn信息
        # salt '随便一台主机名' grains.item fqdn

  1. [root@linux-node1 ~]# salt 'linux-node1.localdomain' grains.items
  2. linux-node1.localdomain:
  3. ----------
  4. SSDs:
  5. biosreleasedate:
  6. 07/02/2015
  7. biosversion:
  8. 6.00
  9. cpu_flags:
  10. - fpu
  11. - vme
  12. - de
  13. - pse
  14. - tsc
  15. - msr
  16. - pae
  17. - mce
  18. - cx8
  19. - apic
  20. - sep
  21. - mtrr
  22. - pge
  23. - mca
  24. - cmov
  25. - pat
  26. - pse36
  27. - clflush
  28. - dts
  29. - mmx
  30. - fxsr
  31. - sse
  32. - sse2
  33. - ss
  34. - ht
  35. - syscall
  36. - nx
  37. - pdpe1gb
  38. - rdtscp
  39. - lm
  40. - constant_tsc
  41. - arch_perfmon
  42. - pebs
  43. - bts
  44. - nopl
  45. - xtopology
  46. - tsc_reliable
  47. - nonstop_tsc
  48. - aperfmperf
  49. - eagerfpu
  50. - pni
  51. - pclmulqdq
  52. - vmx
  53. - ssse3
  54. - fma
  55. - cx16
  56. - pcid
  57. - sse4_1
  58. - sse4_2
  59. - x2apic
  60. - movbe
  61. - popcnt
  62. - tsc_deadline_timer
  63. - aes
  64. - xsave
  65. - avx
  66. - f16c
  67. - rdrand
  68. - hypervisor
  69. - lahf_lm
  70. - abm
  71. - epb
  72. - tpr_shadow
  73. - vnmi
  74. - ept
  75. - vpid
  76. - fsgsbase
  77. - tsc_adjust
  78. - bmi1
  79. - avx2
  80. - smep
  81. - bmi2
  82. - invpcid
  83. - xsaveopt
  84. - dtherm
  85. - arat
  86. - pln
  87. - pts
  88. cpu_model:
  89. Intel(R) Core(TM) i7-4710MQ CPU @ 2.50GHz
  90. cpuarch:
  91. x86_64
  92. disks:
  93. - sda
  94. - sr0
  95. - dm-0
  96. - dm-1
  97. - dm-2
  98. dns:
  99. ----------
  100. domain:
  101. ip4_nameservers:
  102. - 192.168.0.1
  103. ip6_nameservers:
  104. nameservers:
  105. - 192.168.0.1
  106. options:
  107. search:
  108. - localdomain
  109. sortlist:
  110. domain:
  111. localdomain
  112. fqdn:
  113. localhost.localdomain
  114. fqdn_ip4:
  115. - 127.0.0.1
  116. fqdn_ip6:
  117. - ::1
  118. fqdns:
  119. gid:
  120. 0
  121. gpus:
  122. |_
  123. ----------
  124. model:
  125. SVGA II Adapter
  126. vendor:
  127. vmware
  128. groupname:
  129. root
  130. host:
  131. localhost
  132. hwaddr_interfaces:
  133. ----------
  134. ens33:
  135. 00:0c:29:fd:fa:c7
  136. lo:
  137. 00:00:00:00:00:00
  138. virbr0:
  139. 52:54:00:17:39:b3
  140. virbr0-nic:
  141. 52:54:00:17:39:b3
  142. id:
  143. linux-node1.localdomain
  144. init:
  145. systemd
  146. ip4_gw:
  147. 192.168.0.1
  148. ip4_interfaces:
  149. ----------
  150. ens33:
  151. - 192.168.0.2
  152. lo:
  153. - 127.0.0.1
  154. virbr0:
  155. - 192.168.122.1
  156. virbr0-nic:
  157. ip6_gw:
  158. False
  159. ip6_interfaces:
  160. ----------
  161. ens33:
  162. - fe80::cd7:c134:744a:cf30
  163. lo:
  164. - ::1
  165. virbr0:
  166. virbr0-nic:
  167. ip_gw:
  168. True
  169. ip_interfaces:
  170. ----------
  171. ens33:
  172. - 192.168.0.2
  173. - fe80::cd7:c134:744a:cf30
  174. lo:
  175. - 127.0.0.1
  176. - ::1
  177. virbr0:
  178. - 192.168.122.1
  179. virbr0-nic:
  180. ipv4:
  181. - 127.0.0.1
  182. - 192.168.0.2
  183. - 192.168.122.1
  184. ipv6:
  185. - ::1
  186. - fe80::cd7:c134:744a:cf30
  187. kernel:
  188. Linux
  189. kernelrelease:
  190. 3.10.0-957.el7.x86_64
  191. kernelversion:
  192. #1 SMP Thu Nov 8 23:39:32 UTC 2018
  193. locale_info:
  194. ----------
  195. defaultencoding:
  196. UTF-8
  197. defaultlanguage:
  198. zh_CN
  199. detectedencoding:
  200. UTF-8
  201. localhost:
  202. linux-node1.localdomain
  203. lsb_distrib_codename:
  204. CentOS Linux 7 (Core)
  205. lsb_distrib_id:
  206. CentOS Linux
  207. machine_id:
  208. 37a27c09411541ca8f072be3ccc05527
  209. manufacturer:
  210. VMware, Inc.
  211. master:
  212. 192.168.0.2
  213. mdadm:
  214. mem_total:
  215. 3771
  216. nodename:
  217. linux-node1.localdomain
  218. num_cpus:
  219. 4
  220. num_gpus:
  221. 1
  222. os:
  223. CentOS
  224. os_family:
  225. RedHat
  226. osarch:
  227. x86_64
  228. oscodename:
  229. CentOS Linux 7 (Core)
  230. osfinger:
  231. CentOS Linux-7
  232. osfullname:
  233. CentOS Linux
  234. osmajorrelease:
  235. 7
  236. osrelease:
  237. 7.6.1810
  238. osrelease_info:
  239. - 7
  240. - 6
  241. - 1810
  242. path:
  243. /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
  244. pid:
  245. 21258
  246. productname:
  247. VMware Virtual Platform
  248. ps:
  249. ps -efHww
  250. pythonexecutable:
  251. /usr/bin/python
  252. pythonpath:
  253. - /usr/bin
  254. - /usr/lib64/python27.zip
  255. - /usr/lib64/python2.7
  256. - /usr/lib64/python2.7/plat-linux2
  257. - /usr/lib64/python2.7/lib-tk
  258. - /usr/lib64/python2.7/lib-old
  259. - /usr/lib64/python2.7/lib-dynload
  260. - /usr/lib64/python2.7/site-packages
  261. - /usr/lib/python2.7/site-packages
  262. pythonversion:
  263. - 2
  264. - 7
  265. - 5
  266. - final
  267. - 0
  268. saltpath:
  269. /usr/lib/python2.7/site-packages/salt
  270. saltversion:
  271. 2019.2.0
  272. saltversioninfo:
  273. - 2019
  274. - 2
  275. - 0
  276. - 0
  277. selinux:
  278. ----------
  279. enabled:
  280. True
  281. enforced:
  282. Enforcing
  283. serialnumber:
  284. VMware-56 4d 48 8f 93 62 a0 3f-01 fa 25 b5 f5 fd fa c7
  285. server_id:
  286. 740310944
  287. shell:
  288. /bin/sh
  289. swap_total:
  290. 3967
  291. systemd:
  292. ----------
  293. features:
  294. +PAM +AUDIT +SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 -SECCOMP +BLKID +ELFUTILS +KMOD +IDN
  295. version:
  296. 219
  297. uid:
  298. 0
  299. username:
  300. root
  301. uuid:
  302. 8f484d56-6293-3fa0-01fa-25b5f5fdfac7
  303. virtual:
  304. VMware
  305. zfs_feature_flags:
  306. False
  307. zfs_support:
  308. False
  309. zmqversion:
  310. 4.1.4
  311. [root@linux-node1 ~]#

应用二

root@linux-node1 ~]# vim /srv/salt/base/web/apache.sls
apache-install:
  pkg.installed:
    - name: httpd

apache-service:
  service.running:
    - name: httpd
    - enable: True

[root@linux-node1 ~]# vim /srv/salt/base/top.sls           
base:
  'os:CentOS':
    - match: grain
    - web.apache

[root@linux-node1 ~]# salt '*' state.highstate

应用三  通过minion的配置文件定义grains
[root@web1 ~]# vim /etc/salt/minion
    grains:
       web:
         apache
[root@web1 ~]# systemctl restart salt-minion.service
    
    [root@web2 ~]# vim  /etc/salt/minion
    grains:
       web:
         nginx
    [root@web2 ~]# systemctl restart salt-minion.service
    
    [root@sm ~]# salt '*' saltutil.sync_grains
    web1:
    db1:
    cache:
    web2:
    db2:

[root@sm ~]# salt -G 'web:apache' test.ping
    web1:
        True
    [root@sm ~]# salt -G 'web:nginx' test.ping
    web2:
        True

[root@sm ~]# salt 'web1' grains.item web
    web1:
        ----------
        web:
            apache

[root@sm ~]# salt 'web2' grains.item web
    web2:
        ----------
        web:
            nginx

应用四 在minion的/etc/salt下创建一个grains文件自定义grains键值对

例子一

[root@linux-node2 ~]# vim /etc/salt/grains
haha: linux-node1
[root@linux-node2 ~]# systemctl restart salt-minion

[root@linux-node1 ~]# salt '*' grains.get haha
linux-node1.localdomain:
linux-node2.localdomain:
    linux-node1
例子二

[root@linux-node2 ~]# vim /etc/salt/grains
haha: linux-node1

[root@linux-node1 ~]# salt '*' saltutil.sync_grains 不需要重启就可以获取值 相对于例子一

[root@linux-node1 ~]# salt '*' grains.get haha
linux-node1.localdomain:
linux-node2.localdomain:
    linux-node1

Pillar基础  在master端设置

• Pillar也是saltstack最重要的组件之一
• 作用是定义与被控主机相关的任何数据,定义好的数据可以被其他组件使用
• 存储在master端,存放需要提供给minion的信息
• 常用于敏感信息,每个minion只能访问master分配给自己的pillar信息
• 用于经常动态变化的信息
eg
[root@linux-node1 ~]# vim /etc/salt/master
#pillar_opts: False   改成True去掉注释
[root@linux-node1 ~]# salt '*' pillar.items 查看所有隐藏的pillar数据

[root@linux-node1 ~]# vim /etc/salt/master
pillar_roots:
  base:
    - /srv/pillar/base
  prod:
    - /srv/pillar/prod

[root@linux-node1 ~]#mkdir -p /srv/pillar/{base,prod}
[root@linux-node1 ~]#systemctl restart salt-master
#######################################################################
[root@linux-node1 ~]# vim /srv/pillar/base/apache.sls  自定义隐藏数据
{% if grains['os'] == 'CentOS' %}
apache: httpd
{% elif grains['os'] == 'Debian' %}
apache: apache2
{% endif %}

[root@linux-node1 ~]# vim /srv/pillar/base/top.sls
base:
  '*':
    - apache

[root@linux-node1 ~]# salt '*' pillar.items 不用重启服务pillar自动加载
linux-node2.localdomain:
    ----------
    apache:
        httpd
linux-node1.localdomain:
    ----------
    apache:
        httpd
        
    
[root@linux-node1 ~]# vim /srv/salt/base/web/apache.sls
apache-install:
  pkg.installed:
    - name: {{ pillar['apache'] }} #调用pillar定义的值

apache-service:
  service.running:
    - name: {{ pillar['apache'] }}
    - enable: True
    
[root@linux-node1 base]# vim /srv/salt/base/top.sls     
base:
  'os:CentOS':
    - match: grain
    - web.apache

salt '*' state.highstate 第一步执行/srv/salt/base/top.sls 然后执行/srv/salt/base/web/apache.sls

  1. 配置pillar
  2. Pillar需要一个pillar_roots来维护pillar的配置
  3. 默认pillar_roots为/srv/pillar
  4. pillar_rootsMaster配置文件中定义
  5.  
  6. [root@sm ~]# vim /etc/salt/master
  7. pillar_roots:
  8. base:
  9. - /srv/pillar
  10.  
  11. [root@sm ~]# mkdir /srv/pillar
  12. [root@sm ~]# systemctl restart salt-master
  13.  
  14. Pillar数据文件
  15. Pillar执行时需要一个名为top.sls的入口文件
  16. 通过top.sls文件作为入口,组织其它的pillar文件
  17. sls文件采用YAML格式
  18.  
  19. [root@sm ~]# cd /srv/pillar
  20. [root@sm pillar]# vim top.sls
  21. base: # 与pillar_roots定义一致
  22. 'L@web1,web2': # 过滤目标
  23. - appweb # 用于包含 appweb
  24. 'E@db\d':
  25. - appdb
  26. - user
  27. 'cache':
  28. - user
  29.  
  30. [root@sm pillar]# vim appweb.sls
  31. appname: web
  32. software:
  33. - apache
  34. - nginx
  35. [root@sm pillar]# vim appdb.sls
  36. appname: mysql
  37.  
  38. [root@sm pillar]# vim user.sls
  39. users:
  40. zhang3: 1000
  41. li4: 1001
  42.  
  43. // 获取pillar全部数据
  44. [root@sm pillar]# salt '*' pillar.items
  45. web1:
  46. ----------
  47. appname:
  48. web
  49. software:
  50. - apache
  51. - nginx
  52. cache:
  53. ----------
  54. users:
  55. ----------
  56. li4:
  57. 1001
  58. zhang3:
  59. 1000
  60. web2:
  61. ----------
  62. appname:
  63. web
  64. software:
  65. - apache
  66. - nginx
  67. db2:
  68. ----------
  69. appname:
  70. mysql
  71. users:
  72. ----------
  73. li4:
  74. 1001
  75. zhang3:
  76. 1000
  77. db1:
  78. ----------
  79. appname:
  80. mysql
  81. users:
  82. ----------
  83. li4:
  84. 1001
  85. zhang3:
  86. 1000
  87. // 将pillar数据同步至minion
  88. [root@sm pillar]# salt '*' saltutil.refresh_pillar
  89. db2:
  90. True
  91. db1:
  92. True
  93. web2:
  94. True
  95. cache:
  96. True
  97. web1:
  98. True
  99. // 根据pillar值匹配minion
  100. [root@sm pillar]# salt 'web1' pillar.item software
  101. web1:
  102. ----------
  103. software:
  104. - apache
  105. - nginx

pillar应用

salt-ssh介绍

[root@linux-node1 ~]# yum -y install salt-ssh

[root@linux-node1 ~]# vim /etc/salt/roster

linux-node1:
  host: 192.168.0.2
  user: root
  passwd: 123123
  port: 22
linux-node2:
  host: 192.168.0.3
  user: root
  passwd: 123123
  port: 22
[root@linux-node1 ~]# salt-ssh '*' test.ping #不支持交互

  1. linux-node1:
  2. ----------
  3. retcode:
  4. 254
  5. stderr:
  6. stdout:
  7. The host key needs to be accepted, to auto accept run salt-ssh with the -i flag:
  8. The authenticity of host '192.168.0.2 (192.168.0.2)' can't be established.
  9. ECDSA key fingerprint is SHA256:2hjLlAn/WOJ6Cx4Q8B70J4X1ObWstIsSvW7zcmGNL3E.
  10. ECDSA key fingerprint is MD5:57:81:6b:a6:62:7e:25:a3:18:04:eb:26:e0:b5:1b:68.
  11. Are you sure you want to continue connecting (yes/no)?
  12. linux-node2:
  13. ----------
  14. retcode:
  15. 254
  16. stderr:
  17. stdout:
  18. The host key needs to be accepted, to auto accept run salt-ssh with the -i flag:
  19. The authenticity of host '192.168.0.3 (192.168.0.3)' can't be established.
  20. ECDSA key fingerprint is SHA256:O9SmNfSYPTyD9lvCospsGqNg53nqcHtOUfaVG/poh6c.
  21. ECDSA key fingerprint is MD5:f1:8d:7f:5e:50:b5:27:14:ca:aa:d8:6d:47:0a:5a:04.
  22. Are you sure you want to continue connecting (yes/no)?

结果

[root@linux-node1 ~]# salt-ssh '*' test.ping -i  #加-i 默认yes 不要交互 或者:
[root@linux-node1 ~]# salt-ssh '*' -r 'ifconfig'  等价于[root@linux-node1 ~]# salt '*' cmd.run 'ifconfig'

[root@linux-node1 ~]# vim .ssh/config           #执行任何命令不用交互                                       
StrictHostKeyChecking no

常用的远程执行模块
[root@linux-node1 ~]# salt 'linux-node1.localdomain' service.status sshd    #service(模块名称).status(方法) sshd(参数)
linux-node1.localdomain:
    True
[root@linux-node1 ~]#

[root@linux-node1 ~]# salt 'linux-node1.localdomain' service.available sshd
linux-node1.localdomain:
    True
[root@linux-node1 ~]# salt 'linux-node1.localdomain' service.get_all #列出运行的所有服务

[root@linux-node1 ~]# salt '*' network.active_tcp  #返回所有TCP连接

  1. linux-node1.localdomain:
  2. ----------
  3. 0:
  4. ----------
  5. local_addr:
  6. 192.168.0.2
  7. local_port:
  8. 4505
  9. remote_addr:
  10. 192.168.0.2
  11. remote_port:
  12. 56454
  13. 1:
  14. ----------
  15. local_addr:
  16. 192.168.0.2
  17. local_port:
  18. 56454
  19. remote_addr:
  20. 192.168.0.2
  21. remote_port:
  22. 4505
  23. 2:
  24. ----------
  25. local_addr:
  26. 192.168.0.2
  27. local_port:
  28. 4505
  29. remote_addr:
  30. 192.168.0.3
  31. remote_port:
  32. 41612
  33. 3:
  34. ----------
  35. local_addr:
  36. 192.168.0.2
  37. local_port:
  38. 22
  39. remote_addr:
  40. 192.168.0.101
  41. remote_port:
  42. 50821
  43. linux-node2.localdomain:
  44. ----------
  45. 0:
  46. ----------
  47. local_addr:
  48. 192.168.0.3
  49. local_port:
  50. 22
  51. remote_addr:
  52. 192.168.0.101
  53. remote_port:
  54. 51528
  55. 1:
  56. ----------
  57. local_addr:
  58. 192.168.0.3
  59. local_port:
  60. 41612
  61. remote_addr:
  62. 192.168.0.2
  63. remote_port:
  64. 4505

结果

[root@linux-node1 ~]# salt '*' network.connect baidu.com 80
linux-node2.localdomain:
    ----------
    comment:
        Successfully connected to baidu.com (123.125.115.110) on tcp port 80
    result:
        True
linux-node1.localdomain:
    ----------
    comment:
        Successfully connected to baidu.com (123.125.115.110) on tcp port 80
    result:
        True

[root@linux-node1 ~]# salt 'linux-node1.localdomain' state.show_top  查看top.sls里面对minion定义数据
linux-node1.localdomain:
    ----------
    prod:
        - lamp

[root@linux-node1 ~]# salt-cp 'linux-node1.localdomain'  /etc/passwd /tmp/hehe #cp功能
linux-node1.localdomain:
    ----------
    /tmp/hehe:
        True
        
        
    
    
######################    
远程执行返回
[root@linux-node1 ~]# salt '*' cmd.run 'yum -y install MySQL-python' 或者[root@linux-node1 ~]# salt '*' pkg.install  MySQL-python

[root@linux-node1 ~]#要安装数据库 MariaDB-server

Use the following mysql database schema:

CREATE DATABASE  `salt`
  DEFAULT CHARACTER SET utf8
  DEFAULT COLLATE utf8_general_ci;

USE `salt`;

--
-- Table structure for table `jids`
--

DROP TABLE IF EXISTS `jids`;
CREATE TABLE `jids` (
  `jid` varchar(255) NOT NULL,
  `load` mediumtext NOT NULL,
  UNIQUE KEY `jid` (`jid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE INDEX jid ON jids(jid) USING BTREE;

--
-- Table structure for table `salt_returns`
--

DROP TABLE IF EXISTS `salt_returns`;
CREATE TABLE `salt_returns` (
  `fun` varchar(50) NOT NULL,
  `jid` varchar(255) NOT NULL,
  `return` mediumtext NOT NULL,
  `id` varchar(255) NOT NULL,
  `success` varchar(10) NOT NULL,
  `full_ret` mediumtext NOT NULL,
  `alter_time` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
  KEY `id` (`id`),
  KEY `jid` (`jid`),
  KEY `fun` (`fun`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `salt_events`
--

DROP TABLE IF EXISTS `salt_events`;
CREATE TABLE `salt_events` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`tag` varchar(255) NOT NULL,
`data` mediumtext NOT NULL,
`alter_time` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
`master_id` varchar(255) NOT NULL,
PRIMARY KEY (`id`),
KEY `tag` (`tag`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

MariaDB [salt]> grant all on salt.* to salt@'%' identified by 'salt';

配置minion
[root@linux-node2 ~]# vim /etc/salt/minion
#return: mysql
#
mysql.host: '192.168.0.2'
mysql.user: 'salt'
mysql.pass: 'salt'
mysql.db: 'salt'
mysql.port: 3306

[root@linux-node2 ~]# systemctl restart salt-minion

[root@linux-node1 ~]# salt 'linux-node2.localdomain' test.ping --return mysql
linux-node2.localdomain:
    True

查看数据库
MariaDB [salt]> select * from salt_returns\G;
*************************** 1. row ***************************
       fun: test.ping
       jid: 20190316185439085889
    return: true
        id: linux-node2.localdomain
   success: 1
  full_ret: {"fun_args": [], "jid": "20190316185439085889", "return": true, "retcode": 0, "success": true, "fun": "test.ping", "id": "linux-node2.localdomain"}
alter_time: 2019-03-16 18:54:39
1 row in set (0.00 sec)

ERROR: No query specified

MariaDB [salt]>

[root@linux-node1 ~]# vim /etc/salt/master
maser_jod_cache: mysql  #加一行   [root@linux-node1 ~]# salt 'linux-node2.localdomain' test.ping #就不用加--return mysql
mysql.host: '192.168.0.2'
mysql.user: 'salt'
mysql.pass: 'salt'
mysql.db: 'salt'
mysql.port: 3306
[root@linux-node1 ~]# systemctl restart salt-master

SaltStact自动化运维工具02的更多相关文章

  1. SaltStact自动化运维工具01

     什么是saltstackSaltstack是基于python开发的一套C/S架构配置管理工具使用SSL证书签方的方式进行认证管理底层使用ZeroMQ消息队列pub/sub方式通信    – 号称世界 ...

  2. SaltStact自动化运维工具03

    存储位置   类型      采集方式                 场景Grains    minion        静态    minion启动时,可以刷新    1.获取信息 2.匹配pil ...

  3. 企业级自动化运维工具应用实战-ansible

    背景 公司计划在年底做一次大型市场促销活动,全面冲刺下交易额,为明年的上市做准备.公司要求各业务组对年底大促做准备,运维部要求所有业务容量进行三倍的扩容,并搭建出多套环境可以共开发和测试人员做测试,运 ...

  4. Ansible自动化运维工具使用

    概述本文描述自动化运维工具 Ansible 的安装及基础使用方法,包含: Centos 下的安装主机配置Ad-Hoc command(命令行执行)Playbook (任务剧本)Ansible 和 Sa ...

  5. Ansible自动化运维工具

    ansible软件介绍 python语言是运维人员必会的语言!  ansible是一个基于Python开发的自动化运维工具!(saltstack)  其功能实现基于SSH远程连接服务!  ans ...

  6. 自动化运维工具-Ansible基础

    目录 自动化运维工具-Ansible基础 什么是Ansible 同类型软件对比 Ansible的功能及优点 Ansible的架构 Ansible的执行流程 安装Ansible ansible配置文件 ...

  7. 自动化运维工具之Puppet基础入门

    一.简介 puppet是什么?它能做什么? puppet是一个IT基础设施自动化运维工具,它能够帮助系统管理员管理基础设施的整个生命周期:比如,安装服务,提供配置文件,启动服务等等一系列操作:基于pu ...

  8. 自动化运维工具-Ansible之2-ad-hoc

    自动化运维工具-Ansible之2-ad-hoc 目录 自动化运维工具-Ansible之2-ad-hoc Ansible ad-hoc Ansible命令模块 Ansible软件管理模块 Ansibl ...

  9. Ansible自动化运维工具及其常用模块

    Ansible自动化运维工具及其常用模块 目录 Ansible自动化运维工具及其常用模块 一.Ansible简介 1. Ansible概述 2. Ansible作用 3. Ansible的工作模块 4 ...

随机推荐

  1. 继续聊WPF——Expander控件(2)

    <Window x:Class="Expander_Sample2.Window1" xmlns="http://schemas.microsoft.com/win ...

  2. ThinkPhp5.0 引入全局自定义函数global

    可以直接调用:相当于global.class.php 全局文件 ==================================================================== ...

  3. mysql中使用order 出现错误

  4. 洛谷 P2634 BZOJ 2152 【模板】点分治(聪聪可可)

    题目描述 聪聪和可可是兄弟俩,他们俩经常为了一些琐事打起来,例如家中只剩下最后一根冰棍而两人都想吃.两个人都想玩儿电脑(可是他们家只有一台电脑)……遇到这种问题,一般情况下石头剪刀布就好了,可是他们已 ...

  5. HDU - 3040 - Happy Girls

    先上题目: Happy Girls Time Limit: 6000/3000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others ...

  6. CGLib与JDK的动态代理

    一.CGLib 简单介绍 CGLib (Code Generation Library) 是一个强大的,高性能,高质量的Code生成类库. 它能够在执行期扩展Java类与实现Java接口. Hiber ...

  7. 原型设计模式prototype-构造js自己定义对象

    <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> ...

  8. 公告:CSDN博客积分系统升级(暂行版)

    各位亲爱的用户: CSDN博客频道将于2014年10月22日23点至10月23日8点进行积分系统的升级,升级期间会影响大家的正常訪问和操作.给大家带来不便.敬请广大用户谅解.很多其它详情见>&g ...

  9. 数据结构之---C语言实现共享栈

    所谓共享栈是两个栈在一个顺序的存储空间中.两个栈的栈底各自是存储空间的首尾地址. 如图我们能够将两个栈构造成一个: 如图: 从这里也就能够分析出来,栈1为空时,就是top1等于-1时.而当top2等于 ...

  10. 报错configure:error: no acceptable C compiler found in $PATH。。

    报错configure:error: no acceptable C compiler found in $PATH.. 查看日志: 出错原因:新安装的linux系统,没有gcc库 解决方案:使用yu ...