1分钟
06 示例3:hosts文件普通变量修改nginx服务端口
vim /etc/ansible/hosts
192.168.30.101 httpd_port=81
192.168.30.102 httpd_port=82
vim templates/nginx.conf.j2
server {
listen {{ http_port }} default server
listen :::{{ http_prot }} default server
}
vim /etc/ansible/hosts
192.168.30.101 httpd_port=81
192.168.30.102 httpd_port=82
vim templates/nginx.conf.j2
server {
listen {{ http_port }} default server
listen :::{{ http_prot }} default server
}
Copyright © 2013-2026 Tencent Cloud.All Rights Reserved. 腾讯云 版权所有
学员评价