I couldn't find the exact same simile. But there are two similar similes.
The first is about the contemplative being withdrawn or not being withdrawn from sensuality in body and mind.
"Then these three similes — spontaneous, never before heard — appeared
to me. Suppose there were a wet, sappy piece of timber lying in the
water, and a man were to come along with an upper fire-stick,
thinking, 'I'll light a fire. I'll produce heat.' Now what do you
think? Would he be able to light a fire and produce heat by rubbing
the upper fire-stick in the wet, sappy timber lying in the water?"
"No, Master Gotama. Why is that? Because the timber is wet & sappy,
and besides it is lying in the water. Eventually the man would reap
only his share of weariness & disappointment."
"So it is with any brahman or contemplative who does not live
withdrawn from sensuality in body & mind, and whose desire,
infatuation, urge, thirst, & fever for sensuality is not relinquished
& stilled within him: Whether or not he feels painful, racking,
piercing feelings due to his striving [for Awakening], he is incapable
of knowledge, vision, & unexcelled self-awakening. This was the first
simile — spontaneous, never before heard — that appeared to me.
"Then a second simile — spontaneous, never before heard — appeared to
me. Suppose there were a wet, sappy piece of timber lying on land far
from water, and a man were to come along with an upper fire-stick,
thinking, 'I'll light a fire. I'll produce heat.' Now what do you
think? Would he be able to light a fire and produce heat by rubbing
the upper fire-stick in the wet, sappy timber lying on land far from
water?"
"No, Master Gotama. Why is that? Because the timber is wet & sappy,
even though it is lying on land far from water. Eventually the man
would reap only his share of weariness & disappointment."
"So it is with any brahman or contemplative who lives withdrawn from
sensuality in body only, but whose desire, infatuation, urge, thirst,
& fever for sensuality is not relinquished & stilled within him:
Whether or not he feels painful, racking, piercing feelings due to his
striving, he is incapable of knowledge, vision, & unexcelled
self-awakening. This was the second simile — spontaneous, never before
heard — that appeared to me.
"Then a third simile — spontaneous, never before heard — appeared to
me. Suppose there were a dry, sapless piece of timber lying on land
far from water, and a man were to come along with an upper fire-stick,
thinking, 'I'll light a fire. I'll produce heat.' Now what do you
think? Would he be able to light a fire and produce heat by rubbing
the upper fire-stick in the dry, sapless timber lying on land?"
"Yes, Master Gotama. Why is that? Because the timber is dry & sapless,
and besides it is lying on land far from water."
"So it is with any brahman or contemplative who lives withdrawn from
sensuality in body & mind, and whose desire, infatuation, urge,
thirst, & fever for sensuality is relinquished & stilled within him:
Whether or not he feels painful, racking, piercing feelings due to his
striving, he is capable of knowledge, vision, & unexcelled
self-awakening. This was the third simile — spontaneous, never before
heard — that appeared to me.
Maha Saccaka Sutta (MN 36)
The second is about the mind being sluggish or not sluggish, agitated or not agitated, and which are the appropriate enlightenment factors for it depending on situation.
"At such times, monks, as the mind is sluggish, that is the wrong time
to cultivate the enlightenment-factor of tranquillity, the
enlightenment-factor of concentration, the enlightenment-factor of
equanimity. What is the reason? A sluggish mind is hard to arouse by
these factors.
"Suppose a man wants to make a small fire blaze. If he heaps wet
grass, wet cow-dung and wet sticks on it, if he exposes it to wind and
rain and sprinkles it with dust, can he make that small fire blaze?"
"No indeed, Lord."
"Just so, when the mind is sluggish it is the wrong time to cultivate
the enlightenment-factors of tranquillity, concentration and
equanimity, because a sluggish mind is hard to arouse through these
factors.
"But, monks, when the mind is sluggish, that is the right time to
cultivate the enlightenment-factor of investigation-of-states, the
enlightenment-factor of energy, the enlightenment-factor of rapture.
What is the reason? A sluggish mind is easy to arouse by these
factors.
"Suppose a man wants to make a small fire blaze. If he heaps dry
grass, dry cow-dung and dry sticks on it, blows on it with his mouth,
and does not sprinkle it with dust, can he make that fire blaze?"
"Yes indeed, Lord."
"... a sluggish mind is easy to arouse through these factors.
"Monks, when the mind is agitated, that is the wrong time to cultivate
the enlightenment-factors of investigation-of-states, of energy, of
rapture. Why? An agitated mind is hard to calm through these factors.
"Suppose a man wants to put a big fire out. If he heaps dry cow-dung
and dry sticks on it, blow on it with his mouth, and does not sprinkle
it with dust, can he put that fire out?"
"No indeed, Lord."
"... an agitated mind is not easy to calm through these factors.
"When the mind is agitated, that is the right time to cultivate the
enlightenment-factors of tranquillity, concentration, equanimity. Why?
Because an agitated mind is easy to calm through these factors.
"Suppose a man wants to put out a big fire. If he heaps wet grass, wet
cow-dung, wet sticks on it and if he exposes it to wind and rain, if
he sprinkles it with dust, can he put that big fire out?"
"Yes indeed, Lord."
"Just so, monks, when the mind is agitated, that is the right time to
cultivate the enlightenment-factors of tranquillity, concentration,
equanimity. An agitated mind is easy to calm through these factors.
"But as for mindfulness, monks, I declare that it is always useful."
Aggi Sutta (SN 46.53)