appointment must have been based on his abilities and good career history. not his ethnicity or sect.
Iranians are much smarter and ahead of that game.
for them nationalism trumps everything else.
Imam Khomeini (rAa) famously said: let Iran burn, if it serves Islam. Now of course, this condition isn't met (especially since the Islamic Republic is practically the only Muslim country to resist zio-American imperialism in such a systematic manner), but it shows what the ideology of Iranian Islamic revolutionaries is.
The ruling and state ideology in Iran since the 1979 Islamic Revolution has really nothing to do with nationalism, and is bona fide Islamic (western analysts would say "islamist").
Which is why the immense majority of Iranian nationalists, who are secular-minded and some of them (not all - one must always avoid erroneous generalizations) even islamophobic, have staunchly opposed the Islamic Republic and intensively worked for "regime change" with massive support from Iran's existential enemies (US regime, Isra"el" and their regional client states).
Only in recent years have some (not all) nationalist-oriented Iranians revised their position and accepted the legitimacy of the Islamic Republic because they finally realized that the enmity of NATO and the zionists is not just against the Iranian government but against Iran herself as a unified nation, given their goal of dismantling Iran along so-called "ethnic" lines. The Islamic Republic, for its part, welcomes their support for the sole reason that it weakens foreign enemies and strengthens the Islamic establishment in Iran, but nevertheless it won't allow nationalists to be politically active inside Iran.
Therefore, and this is very important to note, the support some nationalists (not all - once again, generalizations would be faulty here) - who remain outside the Iranian system and live abroad for the most part, extend to the Islamic Republic, does not translate into any ideological rapprochement or fusion between the two sides: state ideology in the Islamic Republic remains as Islamic as always, Iranian nationalists remain as nationalistic as before and both openly reckon how their ideologies are different by nature, whether or not they tacitly cooperate. Some nationalists accept to set aside the differences for the sake of Iran, knowing that the enemy is a common one: it loathes nations just as much as it loathes traditional religion. But this is without any impact on the Islamic nature of the Iranian state.
This said, Islam does not oppose patriotism, nor does it prohibit local national culture, civilization and corresponding traditions as long as these aren't in contravention with Islamic rules. And the Islamic Republic has a perfectly correct understanding of Islam's stance towards nation and vatan. So the typical Khomeinist is nowhere a nationalist, but likewise will he not harbor any particular hatred towards those aspects of Iran's history, civilization and culture which are in conformity with Islam. His primordial concern and interest though, is Islam and Islam only. Vatan comes clearly next.
You just need to take a brief look at Iranian television programs, Iranian school textbooks, public billboards installed in Iranian cities and so on, to understand that state ideology in the IR is 100% Islamic and not nationalistic at all.
Some schools of thought have very little tolerance for any expression of attachment to the homeland, which they automatically tend to qualify as an un-Islamic preference for nation over God. Shiaphobic currents among them try to single out Iran and the Islamic Republic as particularly "nationalistic", but this is largely due to their sectarian-driven, deep antagonism against Shia Islam. The latter is, by the way, exactly the same in Iran, Iraq, Bahrein, Pakistan etc, since there are no competing "national versions" of Twelver Shia Islam, and the marjaiya, the supreme level of a very integrated Shia clergy, is totally unified across national boundaries. This sort of hostile propaganda against Iran is funded by certain wealthy western client-regimes in the region, given their opposition to an independent Iran which contrary to them, will not bow to zio-American supremacy.
So the appointment of the Sunni Muslim Admiral as chief of the Iranian Army's Navy branch, did not happen on the basis of nationalist thinking, but is in fact a natural thing in the context of the Islamic Republic's religious state ideology. The IR's Islamic ideology ie Khomeinism, is pan-Islamic in essence and not sectarianist. A historical survey of discourse and political practice of the IR for the past 42 years will illustrate this. Sectarianist currents of Shia Islam are in fact very hostile to the Iranian government and its Leadership. In a state that correctly implements Islamic principles, members of sects of Islam that are in the minority among the population, should have access to official positions.
Which is why Sunni Muslims are part of the IR, even if the latter's institutions are shaped after Shia Islamic traditions because over 90% of Iranians belong to that branch of Islam. But even so, the IR will gladly invite a Sunni cleric to help write its Constitution, it will recruit Sunni Muslim citizens alongside their Shia and even non-Muslim compatriots in the armed forces, it will support the struggles of various Sunni Muslim nations (from Bosnia to Palestina via Kurds of Iraq) etc, all in the name of Islam and its correct understanding thereof.