Fix offline install missing community.general collection#184
Fix offline install missing community.general collection#184ssimpson89 wants to merge 1 commit intoctrliq:mainfrom
Conversation
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>
There was a problem hiding this comment.
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.generaltarball installation to the offline collections install block insetup.sh.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| 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 |
There was a problem hiding this comment.
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.
| 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 |
There was a problem hiding this comment.
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.
| 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 |
There was a problem hiding this comment.
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.
Summary
setup.shwas missingcommunity.generalcommunity.general.collection_versionlookup)setup.shfails immediately withlookup plugin (community.general.collection_version) not foundcreate_bundle.ymlintooffline/collections/but was never installed bysetup.shTest plan
setup.shwithk8s_offline: trueandk8s_platform: rke2requirements.ymlwhich already includescommunity.general)🤖 Generated with Claude Code