ansibleplaybookbundle / mediawiki-apb

An APB which deploys Mediawiki
0 stars 9 forks source link

Remove hard coded IP in provision #26

Closed jwmatthews closed 6 years ago

jwmatthews commented 6 years ago

Let's revisit the below and see if we can remove this hardcoded IP for k8s support.

https://github.com/ansibleplaybookbundle/mediawiki-apb/blame/master/roles/mediawiki/tasks/provision.yml#L13

leifmadsen commented 6 years ago

@jwmatthews is this still an issue? The link above doesn't work anymore, but the IP doesn't look static as it is dynamically added to the template now via variable? Close?

{% if 'apps.openshift.io' in lookup('k8s', cluster_info='api_groups') %}
          - name: MEDIAWIKI_SITE_SERVER
            value: {{
              lookup(
                'openshift',
                api_version='route.openshift.io/v1',
                kind='Route',
                namespace=namespace,
                resource_name=app_name
              ) | json_query("spec.host")
            }}
{% else %}
          - name: MEDIAWIKI_SITE_SERVER
            valueFrom:
              fieldRef:
                fieldPath: status.podIP
{% endif %}
jwmatthews commented 6 years ago

@leifmadsen thanks for the note, will close the issue.