12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- ---
- - name: Get timescaledb service IP
- command: kubectl get svc {{ timescaledb_k8s_name }} -n {{ namespace }} -o=jsonpath='{.spec.clusterIP}'
- changed_when: false
- register: timescaledb_svc_ip
- - name: Get timescaledb service port
- command: kubectl get svc {{ timescaledb_k8s_name }} -n {{ namespace }} -o=jsonpath='{.spec.ports[0].port}'
- changed_when: false
- register: timescaledb_svc_port
- - name: Update timescaledb service IP
- replace:
- path: "{{ role_path }}{{ monster_input_file_path }}"
- regexp: " host:.*"
- replace: " host: {{ timescaledb_svc_ip.stdout }}"
- - name: Update timescaledb service port
- replace:
- path: "{{ role_path }}{{ monster_input_file_path }}"
- regexp: " port:.*"
- replace: " port: {{ timescaledb_svc_port.stdout }}"
- before: "# Slurm REST API Configuration"
- - name: Update timescaledb username
- replace:
- path: "{{ role_path }}{{ monster_input_file_path }}"
- regexp: " username:.*"
- replace: " username: {{ timescaledb_user }}"
- - name: Update timescaledb password
- replace:
- path: "{{ role_path }}{{ monster_input_file_path }}"
- regexp: " password:.*"
- replace: " password: {{ timescaledb_password }}"
- - name: Update timescaledb database
- replace:
- path: "{{ role_path }}{{ monster_input_file_path }}"
- regexp: " database:.*"
- replace: " database: {{ timescaledb_name }}"
|