---
- name: Enable and restart all core services
  service:
    name: "{{ item }}"
    enabled: yes
    state: restarted
  ignore_errors: True
  with_items:
    - "mysql"
    - "php7.4-fpm"
    - "nginx"
    - "redis-server"
    - "redis"

---
- name: Enable and restart all core services
  service:
    name: "{{ item }}"
    enabled: yes
    state: restarted
  ignore_errors: True
  with_items:
    - "mysql"
    - "php8.0-fpm"
    - "nginx"
    - "redis-server"
    - "redis"

Fix restarted service name to avoid Bad Gateway errors.
Ansible: Fix restarted service name to avoid Bad Gateway errors.

