Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added variable hostname_var: can be set to 'ansible_fqdn' (use the internal hostname) or… #31

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

lhoss
Copy link
Contributor

@lhoss lhoss commented May 15, 2019

… 'inventory_hostname' (default; use the public/inventory hostname)

… internal hostname) or 'inventory_hostname' (default, uses the public/inventory hostname)
@@ -29,7 +29,7 @@

- name: Get Cloudera Manager API version
uri:
url: http://{{ hostvars[scm_hostname]['inventory_hostname'] }}:{{ scm_port }}/api/version
url: http://{{ hostvars[scm_hostname][hostname_var] }}:{{ scm_port }}/api/version
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually here even better to just use scm_hostname:

    url: http://{{ scm_hostname }}:{{ scm_port }}/api/version

@@ -39,7 +39,7 @@
register: result

# Set base CM API URL
- set_fact: cm_api_url="http://{{ hostvars[scm_hostname]['inventory_hostname'] }}:{{ scm_port }}/api/{{ result.content }}"
- set_fact: cm_api_url="http://{{ hostvars[scm_hostname][hostname_var] }}:{{ scm_port }}/api/{{ result.content }}"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IDEM: actually here even better to just use scm_hostname

roles/scm/handlers/main.yml Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant