Skip to content

Fix offline install missing community.general collection#184

Open
ssimpson89 wants to merge 1 commit intoctrliq:mainfrom
ssimpson89:fix-offline-community-general
Open

Fix offline install missing community.general collection#184
ssimpson89 wants to merge 1 commit intoctrliq:mainfrom
ssimpson89:fix-offline-community-general

Conversation

@ssimpson89
Copy link
Contributor

Summary

  • The offline collection install block in setup.sh was missing community.general
  • This collection is required by the assertions playbook (community.general.collection_version lookup)
  • On offline RKE2 installs, setup.sh fails immediately with lookup plugin (community.general.collection_version) not found
  • The collection tarball is already downloaded by create_bundle.yml into offline/collections/ but was never installed by setup.sh

Test plan

  • Run setup.sh with k8s_offline: true and k8s_platform: rke2
  • Verify assertions playbook passes without the collection_version lookup error
  • Verify online installs are unaffected (online path uses requirements.yml which already includes community.general)

🤖 Generated with Claude Code

The offline collection install block in setup.sh was missing
community.general, which is required by the assertions playbook
(community.general.collection_version lookup). This caused setup.sh
to fail immediately on offline RKE2 installs with 'lookup plugin not found'.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings March 25, 2026 23:25
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses failures in offline installs by ensuring the community.general Ansible collection (needed for the community.general.collection_version lookup used in playbooks/assertions.yml) is installed by setup.sh when using the offline collections bundle.

Changes:

  • Add community.general tarball installation to the offline collections install block in setup.sh.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 129 to +133
ansible-galaxy collection install $(dirname $0)/offline/collections/ansible-posix-1.5.4.tar.gz
ansible-galaxy collection install $(dirname $0)/offline/collections/awx-awx-22.3.0.tar.gz
ansible-galaxy collection install $(dirname $0)/offline/collections/kubernetes-core-2.4.0.tar.gz
ansible-galaxy collection install $(dirname $0)/offline/collections/amazon-aws-6.5.0.tar.gz
ansible-galaxy collection install $(dirname $0)/offline/collections/community-general-8.3.0.tar.gz
Copy link

Copilot AI Mar 25, 2026

Choose a reason for hiding this comment

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

The offline install branch still only installs a subset of the collections that are bundled from collections/requirements.yml. Since playbooks/setup.yml always imports playbooks/assertions.yml and required_collections includes azure.azcollection and google.cloud, offline runs can still fail collection assertions even with community.general installed. Consider installing all bundled collection tarballs (or otherwise ensuring the full required_collections set is installed) in the offline path.

Copilot uses AI. Check for mistakes.
ansible-galaxy collection install $(dirname $0)/offline/collections/awx-awx-22.3.0.tar.gz
ansible-galaxy collection install $(dirname $0)/offline/collections/kubernetes-core-2.4.0.tar.gz
ansible-galaxy collection install $(dirname $0)/offline/collections/amazon-aws-6.5.0.tar.gz
ansible-galaxy collection install $(dirname $0)/offline/collections/community-general-8.3.0.tar.gz
Copy link

Copilot AI Mar 25, 2026

Choose a reason for hiding this comment

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

This new community.general install line may never run in environments where the other checked collections are present but community.general is missing, because check_collections() doesn’t currently verify any community.general plugin/module. Consider updating the detection logic to include a check for the community.general.collection_version lookup (or another community.general component), so missing community.general reliably triggers the install block.

Copilot uses AI. Check for mistakes.
ansible-galaxy collection install $(dirname $0)/offline/collections/awx-awx-22.3.0.tar.gz
ansible-galaxy collection install $(dirname $0)/offline/collections/kubernetes-core-2.4.0.tar.gz
ansible-galaxy collection install $(dirname $0)/offline/collections/amazon-aws-6.5.0.tar.gz
ansible-galaxy collection install $(dirname $0)/offline/collections/community-general-8.3.0.tar.gz
Copy link

Copilot AI Mar 25, 2026

Choose a reason for hiding this comment

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

The offline collection install commands use an unquoted $(dirname $0) path. If the script path contains spaces or glob characters, this will break and can cause ansible-galaxy to receive a truncated path. Quote the dirname expansion (and ideally compute a SCRIPT_DIR once) before building these file paths.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants