Skip to content

Don't execute deployment roles if packages are not installed - #1363

Open
rjeffman wants to merge 1 commit into
freeipa:masterfrom
rjeffman:ipaserver_state_absent_fail_uninstall
Open

Don't execute deployment roles if packages are not installed#1363
rjeffman wants to merge 1 commit into
freeipa:masterfrom
rjeffman:ipaserver_state_absent_fail_uninstall

Conversation

@rjeffman

@rjeffman rjeffman commented May 27, 2025

Copy link
Copy Markdown
Member

When running the deployment roles, if packages are not installed, an
error of a missing module is shown, which is confusing to users.

By ensuring that either installation or uninstallation only work if a
minimal set of tools is available allows to provide a meaningful message
and let users act on the environment.

For installation, if ipa-server/client-install is not available, the
installation is aborted with a meaningful error. For uninstallation, we
assume that IPA is not installed and gently finish the process with no
errors.

ipareplica uninstall is not modified as it uses ipaserver role.

Fix #1362

@rjeffman
rjeffman requested a review from t-woerner May 27, 2025 23:32

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @rjeffman - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@rjeffman
rjeffman force-pushed the ipaserver_state_absent_fail_uninstall branch from cd398b2 to 7f30beb Compare May 28, 2025 12:18
@rjeffman
rjeffman force-pushed the ipaserver_state_absent_fail_uninstall branch from 7f30beb to 5054732 Compare June 14, 2025 14:54
@rjeffman
rjeffman force-pushed the ipaserver_state_absent_fail_uninstall branch from 5054732 to f028993 Compare July 15, 2025 00:38
@rjeffman rjeffman changed the title ipaserver: Don't run ipa-server-install if packages are not installed Don't execute deployment roles if packages are not installed Jul 15, 2025
@rjeffman
rjeffman force-pushed the ipaserver_state_absent_fail_uninstall branch from f028993 to 0b4329c Compare November 11, 2025 18:18
@rjeffman
rjeffman force-pushed the ipaserver_state_absent_fail_uninstall branch from 0b4329c to 3bb71dd Compare January 5, 2026 17:56
Comment thread roles/ipaclient/tasks/install.yml Outdated
name: "{{ _ipapackages }}"
state: present

- name: Check package availability

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is checking the availablility of a command, not a package.
Please change to "Check IPA client command availability", also in the following lines.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@rjeffman
rjeffman force-pushed the ipaserver_state_absent_fail_uninstall branch from 3bb71dd to 66ac54e Compare July 20, 2026 13:46
When running the deployment roles, if packages are not installed, an
error of a missing module is shown, which is confusing to users.

By ensuring that either installation or uninstallation only work if a
minimal set of tools is available allows to provide a meaningful message
and let users act on the environment.

For installation, if ipa-server/client-install is not available, the
installation is aborted with a meaningful error. For uninstallation, we
assume that IPA is not installed and gently finish the process with no
errors.

Signed-off-by: Rafael Guterres Jeffman <rjeffman@redhat.com>
@rjeffman
rjeffman force-pushed the ipaserver_state_absent_fail_uninstall branch from 66ac54e to 28ca3e8 Compare July 20, 2026 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ipaserver fails to "undeploy" when packages are not installed

2 participants