You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a Vagrantfile that provisions three boxes running AlmaLinux 8 via libvirt, which use the Ansible provisioner to include this role.
I have no agent nodes, thus I'm not tainting the server nodes. I ran into no issues when provisioning a single node cluster, but I run into issues when specifying multiple server nodes in my Ansible inventory.
In High Availability mode:
I run into the following error on the task: Create keepalived config file
An exception occurred during task execution. To see the full traceback, use -vvv.
The error was: ansible.errors.AnsibleUndefinedVariable: 'ansible.vars.hostvars.HostVarsVars object' has no attribute 'ansible_default_ipv4'.
'ansible.vars.hostvars.HostVarsVars object' has no attribute 'ansible_default_ipv4'
I was able to get past this issue by changing the below line to {{ hostvars[host].ansible_host }}
Summary
I have a Vagrantfile that provisions three boxes running AlmaLinux 8 via libvirt, which use the Ansible provisioner to include this role.
I have no agent nodes, thus I'm not tainting the server nodes. I ran into no issues when provisioning a single node cluster, but I run into issues when specifying multiple server nodes in my Ansible inventory.
In High Availability mode:
I run into the following error on the task:
Create keepalived config file
I was able to get past this issue by changing the below line to
{{ hostvars[host].ansible_host }}
ansible-role-rke2/templates/keepalived.conf.j2
Line 48 in dc6d426
Issue Type
Bug Report
Ansible Version
Steps to Reproduce
Have libvirt setup and the vagrant-libvirt plugin installed along with Vagrant, Ansible, and this role.
Below are the three files necessary when running
vagrant up
:Vagrantfile
playbooks/provision.yml
inventory/hosts.ini
Expected Results
For three server nodes to be provisioned after running
vagrant up
Actual Results
All servers fail to provision rke2 Ansible role.
The text was updated successfully, but these errors were encountered: