# Copyright Broadcom, Inc. All Rights Reserved.
# SPDX-License-Identifier: APACHE-2.0

file:
  /bitnami/discourse:
    exists: true
    filetype: directory
    mode: "2775"
    owner: discourse
    group: root
  /opt/bitnami/discourse/config/discourse.conf:
    exists: true
    filetype: file
    mode: "0644"
    owner: root
    group: root
    contents:
      - "hostname = {{ .Vars.host }}"
      - "db_username = {{ .Vars.postgresql.auth.username }}"
command:
  discourse-cli:
    exec: cd /opt/bitnami/discourse/ && RAILS_ENV=production bundle exec rake -T
    exit-status: 0
