Questions tagged [variables]

6 questions
13
votes
3 answers

ansible: difference between a variable and a fact

While I'm using Ansible for quite some time, I'm not sure I really understand the differences between a variable and a fact. Would it be any difference doing - set_fact: nginx_ssl: /etc/nginx/ssl nginx_conf_file: /etc/nginx/nginx.conf or …
3
votes
1 answer

How to change value of pre-defined variable in GitLab to all lowercase

My environment requires the use of the predefined variable CI_PROJECT_NAMESPACE in .gitlab-ci.yml; however, this variable is in all caps, which makes my build job fail. I've tried several ways to convert the value of this variable to all lowercase…
wwillfred
  • 33
  • 1
  • 3
2
votes
1 answer

Ansible - Variable expansion inside hostvars declaration?

I have a hardcoded hostvars line, like so: node1_hostname={{ hostvars['192.168.0.162']['node1_hostname'] }} I have a set_fact variable from a previous play that I'd like to expand in the host section of the hostvars declaration, instead of the IP…
1
vote
1 answer

How do I refer in Azure Pipelines to an output variable defined in a previous stage for defining stage conditions and new variables?

I'm writing an Azure Pipeline where I use the targetBranchName of a pull request to define the test environment I'm going to use. Since targetBranchName has no value before execution, I created a "prepare" stage where I capture the value of the…
lpacheco
  • 115
  • 6
1
vote
1 answer

Why is parameter not propagated to post-build parameterized build?

I'm trying to apply the guidance I recently read at how to trigger parameterized builds from a different build in Jenkins and https://plugins.jenkins.io/parameterized-trigger/ - but this doesn't seem to work, and I'd like to ask the community for…
StoneThrow
  • 179
  • 1
  • 3
  • 11
1
vote
2 answers

Enable/disable resource in terraform using count

I added a piece of code to support enable/disable to the feature - I used the count. Now I have the following problem: ERROR: on modules/eventhub/main.tf line 110, in resource "azurerm_eventhub" "events": 110: namespace_name =…
Nava Bar
  • 13
  • 1
  • 3