CentOS 自动化运维策略总览
术语澄清与总体思路
分层策略与工具选型
落地路线图
高可用与集群场景
最小可行示例 Ansible Playbook
hosts: webservers become: yes vars: httpd_pkg: httpd httpd_svc: httpd tasks:
name: Install {{ httpd_pkg }} yum: name: “{{ httpd_pkg }}” state: present
name: Enable and start {{ httpd_svc }} service: name: “{{ httpd_svc }}” state: started enabled: yes
name: Open HTTP port in firewalld firewalld: service: http permanent: yes state: enabled notify: reload firewalld
handlers: