influxdata / ansible-collection-molecule

Utilities for deploying and operating Molecule CI environments
MIT License
1 stars 0 forks source link

`potato_platform`: Dynamically generate cluster password #13

Open syndr opened 1 month ago

syndr commented 1 month ago

The 'potato' platform role currently expects the password for access to the influxdb DB to be provided in the molecule configuration file, which leads to plain text passwords being stored.

This password should be dynamically generated during creation and stored in a local configuration file on the Molecule controller during execution.

emoruzzi commented 4 weeks ago

take a look at using influxdata.utils.potato_api, I do have a few updates coming to it soon too.

      - name: Get cluster status until machines are running
        influxdata.utils.potato_api:
          api_host: "{{ api_host }}"
          api_endpoint: "/clusters/{{ cluster_id }}"
          method: GET
          auth_username: "{{ auth_username }}"
          auth_password: "{{ auth_password }}"
          expected_status_code: 200
        register: get_cluster_response
        until: get_cluster_response.content.machines_status == 'terminated'
        retries: 30
        delay: 30