Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails when already installed #5

Closed
vallettea opened this issue Jan 18, 2016 · 1 comment
Closed

Fails when already installed #5

vallettea opened this issue Jan 18, 2016 · 1 comment
Labels

Comments

@vallettea
Copy link

hello,

thanks for the script.
Here is how I use on ubuntu wily:

  vars:
    postgresql_version: "9.4"
    postgresql_package_version: "9.4.5-1"
    postgis_version: "2.1"
    postgis_package_version: "2.1.8+dfsg-4"

  roles:
    - { role: "azavea.postgis" }

works fine on a server with no postgres installed, but once it works launching ansible again with the exact same script gives:

TASK: [azavea.postgresql | Install PostgreSQL] ********************************
failed: [139.162.203.160] => (item=postgresql-9.4=9.4.5-1,postgresql-server-dev-9.4=9.4.5-1) => {"failed": true, "item": "postgresql-9.4=9.4.5-1,postgresql-server-dev-9.4=9.4.5-1"}
stderr: E: There are problems and -y was used without --force-yes

stdout: Reading package lists...
Building dependency tree...
Reading state information...
Suggested packages:
  oidentd ident-server locales-all
The following packages will be REMOVED:
  postgresql-contrib-9.4
The following packages will be DOWNGRADED:
  postgresql-9.4
0 upgraded, 0 newly installed, 1 downgraded, 1 to remove and 51 not upgraded.
Need to get 0 B/2837 kB of archives.
After this operation, 8386 kB disk space will be freed.

msg: '/usr/bin/apt-get -y -o "Dpkg::Options::=--force-confdef" -o "Dpkg::Options::=--force-confold"   install 'postgresql-9.4=9.4.5-1'' failed: E: There are problems and -y was used without --force-yes


FATAL: all hosts have already failed -- aborting

any idea?

@hectcastro
Copy link
Contributor

This role adds PostgreSQL's official APT repositories, which is adding additional versions of the PostgreSQL (and its dependencies) packages. We typically specify the package versions of the official PostgreSQL packages vs. the ones available in the Ubuntu repositories by default:

postgresql_version: "9.4"
postgresql_package_version: "9.4.*.pgdg14.04+1"
postgresql_support_repository_channel: "main"
postgresql_support_libpq_version: "9.5.*.pgdg14.04+2"
postgresql_support_psycopg2_version: "2.6"
postgis_version: "2.1"
postgis_package_version: "2.1.*.pgdg14.04+1"

Note: The PostgreSQL packages all include pgdg in their version names.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants