Confirm the repository is configured by checking the repo list.
yum repolist
You should see the Ambari and HDP utilities repositories in the list. The version values vary depending the installation.
repo id repo name | AMBARI-1.x | Ambari 1.x
Install the Ambari bits using yum. This also installs PostgreSQL.
yum install ambari-server