Hi I have a YAML file that looks like this -
- name: Name 1
url: http://localhost:8080/page1
- name: Name 2
url: http://localhost:8080/page2
- name: Name 3
url: http://localhost:8080/page3
As you can see that http://localhost:8080/ is a common section of the url property.
Is there a way to declare a variable like hostname and reuse it across the file?
I went through this doc and tried the following but it doesnt work -
- hostname: "{{http://localhost:8080}}"
- name: Name 1
url: {{hostname}}/page1
- name: Name 2
url: {{hostname}}/page2
- name: Name 3
url: {{hostname}}/page3
But this doesnt work. Help!
I wanted to toss this suggestion in, you it looks like you're doing this for the base URL of the site you're snapshotting. You can pass a
--base-urlflag to thesnapshotcommand:snapshots.ymlcould be:Relevant Percy CLI PR