📜  使用 ansible 配置网络服务器 - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:50:32.211000             🧑  作者: Mango

代码示例1
# Configure ansible.cfg and hosts first

ansible webserver -m package -a "name=httpd state=present"

ansible webserver -m copy -a "src=~/index.html dest=/var/www/html/"

ansible webserver -m service -a "name=httpd state=started"

ansible webserver -m service -a "name=firewalld state=stopped"