Ansible User 模块添加单用户并ssh-key复制 1 Ansible 版本: ansible 2.9.6 config file = /etc/ansible/ansible.cfg configured module search path = [u'/root/.ansible/pl ...
分类:
其他好文 时间:
2020-04-02 18:01:20
阅读次数:
73
lineinfile 向文本中添加单行 blockinfile 向文本中添加多行 - name: lineinfile hosts: dev tasks: - name: lineinfile lineinfile: path: /tmp/test.txt line: 'Add this line ...
分类:
其他好文 时间:
2020-04-01 17:53:41
阅读次数:
68
lineinfile模块可以确保某一行文本存在于指定的文件中,或者确保从文件中删除指定的文本,还可以根据正则表达式替换某一行文本。下面罗列一下lineinfile模块的参数: path:必须参数,指定要操作的文件 line:用来指定文本内容 regexp:使用正则表达式匹配对应的行,当替换文本时,如 ...
分类:
其他好文 时间:
2020-03-31 17:19:18
阅读次数:
94
Ansible可以执行命令的模块有三个: command shell raw 应尽量避免使用这三个模块来执行命令,因为其他模块大部分都是幂等性的,可以自动进行更改跟踪。 command、shell、raw不具备幂等性。 command、shell模块: 要求受管主机上安装Python。command ...
分类:
系统相关 时间:
2020-03-30 19:49:26
阅读次数:
98
一、课前介绍高五:**ansbie:docker:git/gitlabjenkins课程目标:实现自动化自动化部署:ansible代码管理:gitlab/git,svnCI/CD:ansible+jenkins+gitlab运维的趋势:自动化程度越来越高规则提前请假缺勤1节课扣5份,1天扣20分。日考旷考:旷考一次扣10分Ansible学完后:批量、自动管理主机怎么理解运维?规划架构--架构师采购
分类:
其他好文 时间:
2020-03-30 14:41:34
阅读次数:
151
httpd先相对比较熟悉,ansible的play-book需要多加练习
分类:
其他好文 时间:
2020-03-30 00:04:38
阅读次数:
67
genesis.mksls Convert an installation file/script to an SLS file. Currently supports , , and . CLI Examples: salt genesis.mksls kickstart /path/to/kic ...
分类:
其他好文 时间:
2020-03-28 22:00:07
阅读次数:
81
highstate_doc.read_file output the contents of a file: this is a workaround if the cp.push module does not work. https://github.com/saltstack/salt/iss ...
分类:
其他好文 时间:
2020-03-28 21:52:39
阅读次数:
86
iosconfig.diff_text Return the diff, as text, between the candidate and the running config. candidate_config The candidate configuration sent as text. ...
分类:
移动开发 时间:
2020-03-28 21:51:24
阅读次数:
82
grafana4.get_org Show a single organization. name Name of the organization. profile Configuration profile used to connect to the Grafana instance. Def ...
分类:
其他好文 时间:
2020-03-28 21:49:12
阅读次数:
80