--- - name: Setup LEMP stack hosts: all vars_files: - vault.yaml vars: server_name: wordpress-jr.senecops.com wordpress: dir: /var/www/html/wordpress db_name: wordpress db_user: wp php: version: 8.1 gluster: brick_dir: /srv/data/wordpress mount_dir: /var/www/html/wordpress vol_name: wordpress_vol dir_owner: wordpress dir_group: www-data cluster: - 192.168.56.2 - 192.168.56.3 - 192.168.56.4 pre_tasks: - debug: var=ansible_all_ipv4_addresses[1] # we need gluster on all servers to configure peering - name: Install gluster ansible.builtin.apt: update_cache: true cache_valid_time: 3600 name: - glusterfs-server become: true - name: start service ansible.builtin.service: name: glusterd state: started enabled: true become: true roles: - nginx - mysql - php - glusterfs - wordpress