ansible / galaxy-operator

Galaxy-Operator
GNU General Public License v2.0
7 stars 11 forks source link

Break out pulp.yml vars into defaults/main.yml and vars/main.yml #31

Open rooftopcellist opened 5 months ago

rooftopcellist commented 5 months ago

Currently, we have all of these variables being set in the pulp.yml vars section. We should break these out into defaults/main.yml and vars/main.yml. This will have keep consistency across the operators.

  vars:
    default_settings:
      api_root: '/api/galaxy/pulp/'
      cache_enabled: true
      db_encryption_key: "/etc/pulp/keys/database_fields.symmetric.key"
      galaxy_collection_signing_service: ansible-default
      galaxy_container_signing_service: container-default
      ansible_certs_dir: "/etc/pulp/keys/"
      databases:
        default:
          HOST: "{{ postgres_host }}"
          ENGINE: django.db.backends.postgresql_psycopg2
          NAME: "{{ postgres_database }}"
          USER: "{{ postgres_user }}"
          PASSWORD: "{{ postgres_pass }}"
          PORT: "{{ postgres_port }}"
          CONN_MAX_AGE: 0
          OPTIONS:
            sslmode: '{{ postgres_sslmode }}'
      static_root: /app/galaxy_ng/app/static/
      redis_host: "{{ ansible_operator_meta.name }}-redis-svc"
      redis_port: 6379
      redis_password: ""
    deployment_state: present
    _image: quay.io/ansible/galaxy-ng
    _image_version: "{{ lookup('env', 'DEFAULT_GALAXY_VERSION') or 'latest' }}"
    _image_web: quay.io/ansible/galaxy-ui
    _image_web_version: "{{ lookup('env', 'DEFAULT_GALAXY_UI_VERSION') or 'latest' }}"
    image_pull_policy: Always
    storage_type: File
    file_storage_access_mode: "ReadWriteMany"
    file_storage_size: "100Gi"
    raw_spec: "{{ vars['_pulp_pulpproject_org_pulp']['spec'] }}"
    no_log: true
rooftopcellist commented 5 months ago

We should try removing this task too and see if it is still needed:

    - name: Pre-load role variables for all roles
      include_vars: "{{ item }}"
      loop:
        - /opt/ansible/roles/pulp-api/defaults/main.yml
        - /opt/ansible/roles/pulp-content/defaults/main.yml
        - /opt/ansible/roles/pulp-worker/defaults/main.yml