Skip to content

Resolve issue where defining executable in module would cause it to be marked as None, also allow for setting ioc template directory in module#261

Open
Jakub Wlodek (jwlodek) wants to merge 1 commit into
NSLS2:mainfrom
jwlodek:resolve-executable-in-module-case-add-ioc-template
Open

Resolve issue where defining executable in module would cause it to be marked as None, also allow for setting ioc template directory in module#261
Jakub Wlodek (jwlodek) wants to merge 1 commit into
NSLS2:mainfrom
jwlodek:resolve-executable-in-module-case-add-ioc-template

Conversation

@jwlodek

Copy link
Copy Markdown
Collaborator

No description provided.

…e marked as None, also allow for setting ioc template directory in module

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 updates the Ansible-based IOC deployment flow to (1) correctly resolve an IOC executable when it is specified in an installed module definition, and (2) allow an installed module to define the IOC template root directory used by deploy_ioc.

Changes:

  • Extends the install_module schema and module vars to support ioc_template_root_path, and exposes it as an install_module_leaf_* fact.
  • Refactors deploy_ioc executable and template root path resolution to use explicit priority (default → module → role vars → instance/host config).
  • Updates the rbd9103 IOC to rely on module-provided template root path instead of a role var override.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
schemas/install_module.yml Adds ioc_template_root_path to the module schema.
roles/install_module/vars/rbd9103_a835e1c.yml Sets module-level ioc_template_root_path for rbd9103.
roles/install_module/tasks/install-module.yml Publishes the module’s IOC template root path as a leaf fact when configured.
roles/deploy_ioc/vars/rbd9103.yml Removes the role-level template root path override so module-level config can drive it.
roles/deploy_ioc/tasks/set-facts.yml Introduces new override-priority resolution logic for executable and template root path.
roles/deploy_ioc/defaults/main.yml Switches to null defaults and adds *_default_ variables for resolution logic.

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

Comment on lines +35 to +39
# that are not yet defined.
- name: Detect role-level overrides
ansible.builtin.set_fact:
deploy_ioc_executable_role_set_: "{{ deploy_ioc_executable is not none }}"
deploy_ioc_template_root_path_role_set_: "{{ deploy_ioc_template_root_path is not none }}"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Tested using CMS Cam-03 and verified "none" variables were not present.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants