• LastoftheDinosaurs@walledgarden.xyz
    link
    fedilink
    English
    arrow-up
    4
    ·
    14 days ago

    vars.yml is looking for a directory and file that don’t exist, and the readme doesn’t mention creating them. If you set postgres_password manually, it should work.

    • PriorityMotif@lemmy.worldOP
      link
      fedilink
      arrow-up
      3
      ·
      edit-2
      14 days ago

      Thank you for the answer. should the password be in quotes?

      postgres_password: "{{ lookup('password', 'inventory/host_vars/{{ domain }}/passwords/postgres.psk chars=ascii_letters,digits') }}" # noqa yaml[line-length]

      postgres_password: "password"

      • asudox@lemmy.asudox.dev
        link
        fedilink
        arrow-up
        2
        ·
        13 days ago

        I’d say prefer single quotes for passwords as your password might have some special characters. Single quotes are raw strings, so nothing is escaped.

    • PriorityMotif@lemmy.worldOP
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      13 days ago

      i’m still having issues I’m afraid. I do have a password in my local inventory/host_vars/{{ domain }}/passwords/postgres.psk and it does pass through to both POSTGRES_PASSWORD and PICTRS__SERVER__API_KEY in docker - compose.yml on the server.

      docker compose logs show:

      lemmy-1  | Error: LemmyError { message: Unknown("Error connecting to database"), inner: Error connecting to database
      lemmy-1  | 
      lemmy-1  | Caused by:
      lemmy-1  |     connection to server at "postgres" (172.18.0.2), port 5432 failed: Connection refused
      lemmy-1  |     	Is the server running on that host and accepting TCP/IP connections?
      lemmy-1  |     , context: SpanTrace [] }
      lemmy-1  | Lemmy v0.19.8
      lemmy-1  | Error: LemmyError { message: Unknown("Error connecting to database"), inner: Error connecting to database
      lemmy-1  | 
      lemmy-1  | Caused by:
      lemmy-1  |     connection to server at "postgres" (172.18.0.2), port 5432 failed: Connection refused
      lemmy-1  |     	Is the server running on that host and accepting TCP/IP connections?
      lemmy-1  |     , context: SpanTrace [] }
      lemmy-1  | Lemmy v0.19.8
      lemmy-1  | Error: LemmyError { message: Unknown("Error connecting to database"), inner: Error connecting to database
      lemmy-1  | 
      lemmy-1  | Caused by:
      lemmy-1  |     connection to server at "postgres" (172.18.0.2), port 5432 failed: Connection refused
      lemmy-1  |     	Is the server running on that host and accepting TCP/IP connections?
      lemmy-1  |     , context: SpanTrace [] }
      lemmy-1  | Lemmy v0.19.8
      lemmy-1  | Error: LemmyError { message: Unknown("Error connecting to database"), inner: Error connecting to database
      lemmy-1  | 
      lemmy-1  | Caused by:
      lemmy-1  |     connection to server at "postgres" (172.18.0.2), port 5432 failed: Connection refused
      lemmy-1  |     	Is the server running on that host and accepting TCP/IP connections?
      lemmy-1  |     , context: SpanTrace [] }
      lemmy-1  | Lemmy v0.19.8
      lemmy-1  | Error: LemmyError { message: Unknown("Error connecting to database"), inner: Error connecting to database
      lemmy-1  | 
      lemmy-1  | Caused by:
      lemmy-1  |     connection to server at "postgres" (172.18.0.2), port 5432 failed: Connection refused
      lemmy-1  |     	Is the server running on that host and accepting TCP/IP connections?
      lemmy-1  |     , context: SpanTrace [] }
      lemmy-1  | Lemmy v0.19.8
      lemmy-1  | Federation enabled, host is dullsters.net
      lemmy-1  | Starting HTTP server at 0.0.0.0:8536