Add general hosts and fist playbook
This commit is contained in:
15
update-ip.yaml
Normal file
15
update-ip.yaml
Normal file
@@ -0,0 +1,15 @@
|
||||
- name: Update proxy IP
|
||||
hosts: proxy
|
||||
vars:
|
||||
proxy_conf_path: "/etc/nginx/nginx.conf"
|
||||
old_ip6: "sbhbad"
|
||||
new_ip6: "sbhgood"
|
||||
tasks:
|
||||
- name: Change ip in
|
||||
ansible.builtin.shell: sed -i s/{{ old_ip6 }}/{{ new_ip6 }}/ {{ proxy_conf_path }}
|
||||
|
||||
- name: Restart nginx service
|
||||
ansible.builtin.service:
|
||||
name: nginx
|
||||
state: restarted
|
||||
|
||||
Reference in New Issue
Block a user