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

Run-time target evaluation #90

Closed
umputun opened this issue May 13, 2023 · 1 comment
Closed

Run-time target evaluation #90

umputun opened this issue May 13, 2023 · 1 comment
Labels

Comments

@umputun
Copy link
Owner

umputun commented May 13, 2023

The idea is to assign the target inside the task in the runtime. The issue I'm trying to address is this: the first task makes a "thing", let's say, a new instance. To address this instance as a target for the next task, this info should be passed in. Currently, we can propagate this IP like export INSTANCE_IP=$(whatever command), but it won't make any target and will force us to use the script with the local option and make all the operations a part of the script. In addition, it won't be populated with other tasks.

The idea is to allow task's target to be a variable, i.e.

- name: copy files to the instance
   targets: [$new_instance]
   ...

To me, it sounds logical and even expected behavior. Allowing task-level targets to be vars should be easy to implement; we could do it similarly as all the vars are populated via env.

@umputun umputun added the idea label May 13, 2023
@umputun
Copy link
Owner Author

umputun commented May 14, 2023

This was implemented by #92

@umputun umputun closed this as completed May 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant