combining set_fact with --start-at-task

Hi,

I have a play that sets some facts at the very beginning, using set_fact (I cannot use group_vars for defining these variables). Now, if this playbook fails and I rerun it using --start-at-task=something, the set_fact won’t be ran and the playbook will fail.

Is there any way of forcing “set_fact” tasks to always run? (using “tags: always” doesn’t help). Or some other way that would allow me to define special variables but at the same time be able to start the playbook at any task?

thanks,
Janek

The ‘always’ tag only affects the --tags option, there is currently no way to override --start-at-task.

I would recommend using --step to run the set_fact tasks and then skip the others.