- name: Front - Install packages ansible.builtin.apt: name: "{{ item }}" state: latest loop: "{{ front.packages }}" tags: - install_front - name: Front - Configure nginx port ansible.builtin.lineinfile: path: /etc/zabbix/nginx.conf regexp: 'listen 8080;' line: " listen 80;" tags: - install_front # - name: Front - Setup # ansible.builtin.template: # src: zabbix_front.conf.j2 # dest: /etc/zabbix/web/zabbix.conf.php # owner: www-data # group: www-data # mode: 0600 - name: Front - Configure nginx url ansible.builtin.lineinfile: path: /etc/zabbix/nginx.conf regexp: 'server_name example.com;' line: " server_name {{ inventory_hostname }};" tags: - install_front notify: Restart nginx - name: Front - Configure keepalived ansible.builtin.template: src: keepalived.conf.j2 dest: /etc/keepalived/keepalived.conf owner: root group: root mode: 0644 notify: Restart Keepalived