Comments (5)
I am looking into a fix, I tried changing the defaults to tower_ah_url: "https://{{ tower_ah_nodes[0] | default('localhost') }}"
but it didn't seem to work. It works when I put it in my main vars but I thought you might want to avoid that. What do you think?
from aap_utilities.
The obvious solution is to just set the value of tower_ah_url in your playbook. I do, however, like the idea of setting it to be related to tower_ah_nodes, although that might not work in all circumstances (e.g. if you defined some host specific vars under tower_ah_hosts - bit of a hack but can be done).
I'm not entirely sure why your example does not work. When i put together a simple debugging playbook it does seem to:
---
- hosts: localhost
vars:
tower_ah_nodes:
- ahnode.example.com
tasks:
- debug:
msg: "https://{{ tower_ah_nodes[0] | default('localhost') }}"
results in
TASK [debug] *************************************************************************************
ok: [localhost] => {
"msg": "https://ah-node-dc1.example.com"
and setting tower_ah_nodes: []
(as per default) you get
ok: [localhost] => {
"msg": "https://localhost"
}
So seemingly working?
from aap_utilities.
I might not have been clear, it does work when I have it in my vars file with everything else, it does not however work when I modified the defaults file to that instead of directly setting it to localhost. I will test again to confirm that it does not work in defaults or if it was some oversight on my part that caused it to not work when I first tried it.
from aap_utilities.
Ok I figured it out I was being stupid and modified the wrong defaults/main.yml which is why it didn't work for me. But you said you didn't like this as a full on fix?
from aap_utilities.
No, I'm happy for the default to be set as tower_ah_nodes[0]
. For instances where tower_ah_nodes is set as something where this just wouldnt work, the user can just use their own value for tower_ah_url
from aap_utilities.
Related Issues (20)
- Add management roles/playbooks HOT 1
- RHEL version needs to be string HOT 1
- Cannot inject additional values via -e @conf.yaml into installer HOT 2
- Allow the option to simply ensure/check if namespace is created HOT 9
- README for aap_ocp_install role suggest to use wrong variable name HOT 1
- aap_setup_download role has errors with AAP 2.3 HOT 3
- Add the ability to set the favicon for Ansible Controller on OCP
- Ability to define Instance Groups during aap_setup_install HOT 4
- aap_setup_install: Waiting for "eda controller" to be running, HOT 3
- aap_setup_install assumes dictionaries in aap_setup_prep_inv_nodes var HOT 3
- Incorrect installation setup bundle extracted and configured HOT 1
- aap_setup_download role fails to download setup bundle HOT 1
- Add support for AAP containerized installer HOT 1
- aap_setup_rhel_version confusion HOT 11
- Automation Hub Fails to Validate
- Add example implementation to prepare/install roles
- Collection requirements HOT 2
- controller_hostname and ah_hostname within aap_setup_install not variabilised HOT 1
- Incorrect tag??? HOT 1
- Backup role does not add much value HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aap_utilities.