How to encrypt the PostgreSQL password in automation controller configuration files on Red Hat Ansible Automation Platform?

Solution Verified - Updated -

Issue

  • How to encrypt the PostgreSQL password stored in plain text in /etc/tower/conf.d/postgres.py on the automation controller?
  • After replacing the password with decrypt_value(get_encryption_key('value'), ...), commands fail with:

    django.core.exceptions.ImproperlyConfigured: The SECRET_KEY setting must not be empty.
    

Environment

  • Red Hat® Ansible Automation Platform 2.5 and 2.6
  • Automation Controller (RPM-based installation)

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content