In an earlier post (highlighted by CP in his latest thread) I had said that Turkey's move of a troop contingent to Iraq, near Mosul, was a part of the West's plan with regard to that country.
On further reflection, I think that is incorrect. While I still think that the West's ultimate aim is to have Iraq end up in three entities ‒ Kurdish, Sunni and Shia ‒ I believe this move was made by Turkey on its own, to serve its own purposes. Turkey's ultimate aim in Iraq is to have its Sunni areas come under its own control, or at least influence. This move is designed to ensure the furtherance of that aim.
It is based on the expectation that, with the further weakening of the Islamic State (IS) in Syria and Iraq, and thus on its control of Mosul, at some stage an attack on the city by the anti-IS forces will become possible. This may well occur along with an uprising in the city. Best placed to carry out such an operation are the Iraqi army plus Shia militias and the Kurds.
Mosul's population is currently almost entirely Sunni, and Turkey will pose as its protector. It will not let the Iraqis attack the city, ostensibly to avoid the inevitable casualties among the Sunni civilian inhabitants. Its preferred course would be to have Mosul taken ostensibly by the Iraqi Sunni militias (which it is organizing under Atheel Nujaifi, former governor of Mosul) aided by Turkish troops (it would rapidly reinforce its present relatively small contingent).
If the situation is fluid, Barzani may take the opportunity to send in the Kurdish Peshmerga to seize Mosul for the Kurds. Turkey is now well-placed to stop such an attack, and (should the Sunni option not be practicable) force the Kurds to conduct a joint operation with the Sunni militia, supported by Turkish troops, to take Mosul. The Kurdish reward would be retention of the formerly Kurdish portions of the city. But the fate of the city and its surrounding region would remain firmly in Turkish hands.