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

ara_playbook/ara_record: set BYPASS_HOST_LOOP to run once #274

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dmsimard
Copy link
Contributor

@dmsimard dmsimard commented May 5, 2021

These action plugins interact with the API to get a playbook or add a
key/value record. When run against an inventory of 100 hosts, these
shouldn't be running 100 times as they only need to run once to retrieve
or set the data.

These action plugins interact with the API to get a playbook or add a
key/value record. When run against an inventory of 100 hosts, these
shouldn't be running 100 times as they only need to run once to retrieve
or set the data.
@flowerysong
Copy link
Contributor

flowerysong commented May 5, 2021

-1

ara_playbook has a stronger case for using this, but even there I could see someone wanting to retrieve a different playbook based on the current host (e.g. storing the playbook ID that generated a machine image in a file, then using the contents of that file as playbook_id).

ara_record can currently be used for storing per-host records, which this change would prevent.

Purely per-host records could be argued to be against the design intent of the action, but consider something that's merely reliant on a value that can vary across hosts, like:

- ara_record:
    key: foo_version_{{ foo_version }}
    value: true

@dmsimard
Copy link
Contributor Author

dmsimard commented May 5, 2021

Hey @flowerysong, thanks for the input and you're right, I agree.

This originates from a user asking about why the modules were running N times for N hosts and perhaps the better approach is instead to add a suggestion/recommendation to set run_once on the task unless there is a use case like the ones you mentioned.

@dmsimard dmsimard marked this pull request as draft March 25, 2022 00:57
@dmsimard
Copy link
Contributor Author

Putting this in draft, I have no intention of merging it but keeping it opened as a reminder for now.

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.

None yet

2 participants