mongodb: fix config file installation.

References #22149.
Closes #22329.
Closes #22331.