分类: Ansible 运维自动化

7 篇文章

ansible批量升级CentOS7
playbook 编写 [zhupengfei@devops-centos7-shanghai-area1 ansible]$ sudo vim yum_update.yml --- - hosts: all gather_facts: no tasks: - name: update cache # 更新yum源缓存 yum: update_ca…
ansible批量部署ntp时间同步
playbook 部署ntp时间同步 [zhupengfei@devops-centos7-shanghai-area1 ansible]$ cat ntpdate.yml --- - hosts: all any_errors_fatal: "{{ any_errors_fatal | default(true) }}" ta…
ansible批量升级OpenSSH版本
CentOS Linux release 7.9.2009 (Core) 默认的OpenSSH版本是OpenSSH_7.4p1,YUM提供的最新版本也是 OpenSSH_7.4p1,对OpenSSH升级,须采用编译部署的方式。 [root@ansible-centos7-shanghai-area0 roles]# vim update_opens…
ansible批量升级sudo版本
操作 [root@ansible-centos7-shanghai-area0 ~]# vim /etc/ansible/update_sudo.yml - name: 更新sudo版本 hosts: "{{ hosts }}" remote_user: root tasks: - name: CentOS 7 更新sudo版本…
ansible批量部署zabbix-agent
密钥授权认证实现免密登陆 [root@ansible-centos7-shanghai-area6 ~]# ssh-keygen -t rsa [root@ansible-centos7-shanghai-area6 ~]# ssh-copy-id -i /root/.ssh/id_rsa.pub 10.0.2.21 在ansible/hosts中…
运维自动化之Ansible进阶Playbook使用指南
每个playbook被称为一个剧本,其中的一系列任务称为戏剧(play)。 yaml 语法 多行缩进 连续项目通过减号 - 表示,列表 [] map结构的key/value用冒号分隔 {} 字符串不一定要用双引号标识 文档开始 --- 选择性符号 ... 可用来表示文档结尾 #表示注释 yaml教程:http://www.ruanyifeng.co…
运维自动化之Ansible
ansible是什么? 借助官网上的一句话,ansible is a simple IT automation, 即ansible 是用于IT自动化管理的一个工具。 ansible能做什么? ansible可以完成一些批量任务,或者完成一些需要经常重复的工作。 如何使用ansible? 执行如下命令前,需要进行一些配置,如下命令才能正常执行,后文中…
/*
Theme Argon
*/