How can I add keys to a hash variable in Ansible YAML in Environmenvariables

0 votes
asked Feb 3, 2016 by mcwhite (760 points)
Thanks for your input. I've got variable in Ansible that I use to pass environment variables to task. However, I've got another playbook that uses role, and I'd like to tack more values onto variable.

5 Answers

0 votes
answered Jun 3, 2016 by mahaxay (590 points)
Best answer
This question seems to be a dupe of this one. This library should serve your goal well luck
commented Jun 5, 2016 by Optionsis (120 points)
VariablesBefore we look at the Tasks, let's look at variables
commented Jun 5, 2016 by based (300 points)
Here's an example Nginx virtual host configuration
commented Jun 5, 2016 by Its_8248 (110 points)
If this Role depended on another Role, we could define that here
commented Jun 5, 2016 by Guv2147 (110 points)
This allows us to conditionally stop Ansible from running a Task
0 votes
answered Feb 21, 2016 by output (710 points)

Browse other questions tagged ansibleyaml or ask your own question.
0 votes
answered Mar 21, 2016 by wherebairos (360 points)

But adding this to the set theory filters has been declined.
commented Mar 22, 2016 by aytesgeyette (230 points)
However, there are many more tools provided by Ansible to explore
commented Mar 23, 2016 by Objects (240 points)
In my Vagrant server, they are located within /vagrant/ansible/roles
+1 vote
answered Apr 1, 2016 by bellettiere (510 points)

Here's an example variable file which can be created and encrypt with Vault.
The editor used is defined by the EDITOR environmental variable.
We can add this file path to the /etc/ansible/ansible.
0 votes
answered May 31, 2016 by Be_2402 (660 points)
They do have YAML - Wikipedia, the free encyclopedia has since removed this
Not sure how this works
commented Jun 1, 2016 by qbr_in (440 points)
TasksLet's finally see this all put together into a series of Tasks

What is Geekub?

Q&A site for professional and enthusiast programmers, software developers and other technical users. With your help, we hope to work together to build a library of detailed answers to just about any question that is related to programming!