Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ipareplica and ipaclient fail when there are more than one deployment set in an inventory file #1326

Open
rjeffman opened this issue Dec 27, 2024 · 0 comments
Milestone

Comments

@rjeffman
Copy link
Member

When you have more than one deployment define in an inventory file, you can select the hosts to run the playbooks against with something like ipareplicas:&{{ run_here }}.

The problem is that when defining the server list for both ipareplica and ipaclient roles forces a query to the inventory file without the filter in place.

See the tasks from ipareplica:

- name: Install - Set ipareplica_servers
  ansible.builtin.set_fact:
    ipareplica_servers: "{{ groups['ipaservers'] | list }}"
  when: groups.ipaservers is defined and ipareplica_servers is not defined

- name: Install - Set ipareplica_servers from cluster inventory
  ansible.builtin.set_fact:
    ipareplica_servers: "{{ groups['ipaserver'] | list }}"
  when: ipareplica_servers is not defined and groups.ipaserver is defined

The workaround for this issue is to have ipareplica_servers and ipaclient_servers set.

Today, it is not a huge issue as a single deployment is expected, but with IPA-to-IPA migration in place, we may face the same issue as multiple deployments in one inventory file may become more common.

@rjeffman rjeffman added this to the 1.14 milestone Dec 27, 2024
@rjeffman rjeffman changed the title ipareplica and ipaclient fail when there are more than on deployment set in an inventory file ipareplica and ipaclient fail when there are more than one deployment set in an inventory file Dec 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant