Run task for specific host

I have a playbook that runs against 100 hosts.

However one of these needs a bit of extra attention (an additional task).

Is there a way (other than conditionals) I can run this task against this host only?

Trying to avoid conditionals in the playbook to make it clean and generic.

Cheers

In template tick prompt on launch on limit. Rub job template and limit to that host

Run

You can use delegate_to: <specific_host>

and if you want it to be executed only 1 time by that host , you can add also run_once: true

Sorry, I think I haven’t explained what I want very well.

I want to run a generic playbook against 100 hosts which is on an AWX schedule - lets call this Playbook A.

However for 1 of the 100 hosts, I also have to run an additional task, but I dont want to include this in Playbook A as I want to keep it as generic as possible.

Is there a clever way to do this, or is it a case of just setting up Playbook B for the 1/100 host?

Cheers

In that case in the task you want to customise. Set a when in it. Assign it a variable like perform_task_a = true. ( Your discretion). Then create a host var or group var. And add the var to the host or group. That way the members of the group will be the only ones that get that task. The others will skip