macOS: Sonoma 14.2.1
Ubuntu: Ubuntu-20-04-x64
Vagrant box: luminositylabsllc/bento-ubuntu-20.04-arm64
Updated gluster geerlingguy role removing the problem:
- ansible.builtin.include has been removed. Use include_tasks or import_tasks instead. This feature was removed from ansible-core in a release after 2023-05-16. Please update your playbooks.
-
Add your machine SSH to DigitalOcean account
-
Create API token and add to your DigitalOcean project
-
Update vars files to your personal preferences
a) Update u_token in droplet/connection_vars.yml (api_token)
b) Update u_ssh in droplet/connection_vars.yml (ssh fingerprint)
c) Update hosts_dest in droplet/connection_vars.yml (hosts.ini physical destination)
-
With some adjustements to Vagrantfile and playbooks you will be able to run gluster with your local environment.
-
Run required roles:
ansible-galaxy install geerlingguy.firewall (since gluster role tasks are inside the playbook)
-
Run digitalocean.yml to create droplets and update hosts file:
ansible-playbook digitalocean.yml
-
Run playbooks with provision.yml file:
ansible-playbook -i hosts.ini provision.yml
-
ansible gluster -i hosts.ini -a "gluster peer status" -b
-
ansible gluster -i hosts.ini -a "gluster volume info" -b
-
Connect to both servers via SSH and create a file or directory in /mnt/gluster
- you are supposed to see created in /mnt/gluster
If you would like to delete droplets, simply switch state of "Create gluster 1/2" from PRESENT to ABSENT and run your playbook.
-
MacOS - INSTALL CERTIFICATES if your Geerlingguy roles end up with certificate error:
Unknown error when attempting to call Galaxy at 'https://galaxy.ansible.com/api/': <urlopen error [SSL:CERTIFICATE_VERIFY_FAILED]
https://github.com/geerlingguy/ansible-for-devops
https://github.com/geerlingguy/ansible-role-glusterfs
https://github.com/geerlingguy/ansible-role-firewall
2nd edition of Ansible for DevOps Jeff Geerling