title: How can I point the Postgres service to use a different DB directory?
body: <p>I'm using Ansible to install/upgrade PostgreSQL silently on Windows via</p>
  <pre><code>postgresql-12.x-x-windows-x64.exe --mode unattended --unattendedmodeui none
  </code></pre>
  <p>But this uses <code>C:\Program Files\PostgreSQL\data\</code> as the service's data directory. How can I now point the service to an different and &quot;existing&quot; data directory? So I don't necessarily want to do an <code>initdb -D I:\CurrentPGDataDir</code> since it already exists? TIA</p>