vaulted | Spawning and storage of secure environments | Cryptography library
kandi X-RAY | vaulted Summary
kandi X-RAY | vaulted Summary
Spawning and storage of secure environments
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of vaulted
vaulted Key Features
vaulted Examples and Code Snippets
Community Discussions
Trending Discussions on vaulted
QUESTION
Apologies for the lengthy post. I am a relatively newbie to Ansible and Vault (<2 months).
Environment:
- CentOS & Win2019 (90% Linux systems)
- Ansible 2.10.7 (master Ansible controller)
- AWX 17.0.1 (embedded ansible 2.9.17)
Ultimate goals:
- Use the same code from Git for both environments (Prod & Test)
- Ability to separate the 'secrets' values based on which environment
Basic Setup (currently):
- Ansible master controller is designed to be completely self-starting. Meaning all the settings/configs are contained within playbooks. This means I can blow-up the ANS controller and rebuild with 3 min.
- All secrets are encrypted strings within a variable file. Due to the fact AWX cannot import an vaulted file, all secrets are in-line (ansible-vault encrypt_string 'secret_data' --name 'my_secret')
- Same user accounts exists in both environments but different creds
Current Issues:
- If was to import the Git repo into my Prod Ansible master controller, any plays requiring secrets would fail (due it has the secret variable with the 'Test' values)
Thoughts to resolve:
- I thought about using the ansible 'default' function for any secret combined with a 'when' conditional based on the Inventory file. Basically if the inventory file is a 'Test' based system, use 'Test' secrets. If not, then use 'Prod' secrets.
This is an ugly solution from my perspective and must be a better solution.
- Use Hashicorp Vault. It has the ability to use namespace trees to classify creds. I have not played with this idea yet and not sure how viable it is.
I wonder what others in the industry are doing for this same problem. This is not unique issue and sure there are best practices for this situation.
Thanks
...ANSWER
Answered 2021-Mar-22 at 19:30As you want different variables based on your environment (vault secrets are just another variables) then you could use separate inventories for each environment, see https://docs.ansible.com/ansible/2.8/user_guide/playbooks_best_practices.html#alternative-directory-layout. Then, for example, inventories/prod/group_vars/all.yml
would have prod vault secrets... You would specify explicitly each inventory with ansible -i inventories/prod ...
.
In this inventories layout you could share a variable file between environments with symlinks, eg. inventories/prod/group_vars/all/010_cross_env_vars.yml
would be a symlink to ../../../010_cross_env_vars.yml
, thus pointing to variable files located in parent directory of per-environment subdirectories, ie. inventories/010_cross_env_vars.yaml
.
QUESTION
I am studying for the RedHat Certified Specialist in Ansible Automation (EX407) and I'm playing around with the no_log
module parameter. I have a sample playbook structured as so;
ANSWER
Answered 2021-Jan-29 at 18:40So I went digging through the VMWare module source code and this is what I found.
QUESTION
I have two array as :
...ANSWER
Answered 2020-Apr-20 at 08:56You can loop $arr1
, and check its element that matched in keys of $arr2
, and set the matched value to $arr1
, set empty string to the element that cannot found in keys of $arr2
:
QUESTION
I'm using ansible 2.7.16.
The ansible documentation says:
...ANSWER
Answered 2020-Mar-18 at 13:14Q: "How could I get the .yml file decrypted ?"
A: Simply use the file as any other file with variables. For example
QUESTION
I have a public project on Github, it's an Ansible role. In this project, there is many files which are public, and 2 or 3 that are private (mainly private variable files).
I don't really want to push vaulted files, I'd like to maintain this role as clear for users as it can be (I provide cleared example for these files).
The solution I can think of is :
- 1st repo with only public files
- 2nd repo with public & private files
Git hook (or other solution) to push easily on both remote at same time.
What's the bests practices for this situation ?
...ANSWER
Answered 2020-Mar-15 at 15:37Based on @rolf82 and @Zeitounator, the best practice seems to be to maintain a private role and include my public role as a submodule.
QUESTION
I'm running into the issue (feature?) described in Ansible group vars priority , presumably because I've gone about structuring my inventory incorrectly.
The idea was to have two tasks, which apply to all 'routers' or 'firewalls' as defined in the inventory. This part works fine -- Ansible correctly parses the inventory and distinguishes between the two.
The problem is that due to the way the inventory is parsed, it's using the same ansible_user and ansible_password for every customer group. Which apparently makes sense based on the documentation:
When groups of the same parent/child level are merged, it is done alphabetically, and the last group loaded overwrites the previous groups. For example, an a_group will be merged with b_group and b_group vars that match will overwrite the ones in a_group.
Can anyone advise how I should correct this? If I change the 'routers' and 'firewalls' subgroups to be unique, e.g., custA_routers, custB_routers, then it behaves as expected. However then I think I have to write tasks scoped to each of those subgroups. Note that all hosts are unique IP addresses.
Playbook:
...ANSWER
Answered 2020-Jan-23 at 04:14I thiink it is ideal to create two separate inventory, customerOneInventory.yaml and customerTwo.yaml or router.yaml and firewalls.yaml.. up to your need. You'll just specify the inventory file you need during ansible playbook run.
ansible-playbook heat-check-playbook.yaml -i customerOneInventory.yaml
QUESTION
I'm trying to figure out how to provide the following facilities to a Python script so that it can:
- Import Ansible Python modules
- Open up my defined
ansible.cfg
and readvault_password_file
variable - Read
vault_password_file
and temporarily store in a Python variable - Decrypt a referenced Ansible vaulted file
I found this code via google but it did not appear to work when I tried it:
...ANSWER
Answered 2017-May-23 at 21:48This isn't exactly what I want but did work around my above issue by running the ansible view
command via subprocess
.
QUESTION
So I decided to animate my hamburger menu, which was previously unanimated, so this problem was irrelevant to begin with.
The animation starts as a standard hamburger style menu which has several links to different areas of the homepage. When clicked, I animated the menu to turn from a hamburger to an x, indicating to visitors that they can close the menu by clicking on the x. I ran into a problem though, after clicking on a link within the hamburger menu, the icon does not reset from an x back to the hamburger, and that messes up how the menu is opened on the second time. If a visitor were to open it again, the x would turn into the hamburger when the x is clicked on, and it wouldn't make any sense.
Anyways, I'm just wondering if there's a way I could make it so that when a link in the menu gets clicked on, the x returns to its unopened hamburger form. Here's my code:
...ANSWER
Answered 2019-Apr-26 at 23:30Simply add this click handler inside of the $(document).ready()
function to remove the open
CSS class from the hamburger icon when one of the menu links is clicked:
QUESTION
I'm creating an integration for the BlueSnap payment API. I'm using the Hosted Payment Fields solution. So when I create a VaultedShopper I just supply the Hosted Payment Fields token. However, the other mandatory fields for the POST vaulted-shoppers call are FirstName and LastName.
If I supply FirstName and LastName, then the call works OK and the response includes the new ID - but with empty FirstName and LastName.
So I'm wondering what is the point of these fields?
...ANSWER
Answered 2019-Jan-24 at 15:16If you provide first and last name in the request, they must be returned in the response. Keep in mind that JSON fields are case sensitive, so if you are sending "FirstName", the API will probably ignore it. Make sure you are sending "firstName" and "lastName".
QUESTION
I need to have a file with passwords stored and encrypted using ansible vault, I have created an encrypted file named 'passes' stored in group_vars with this content after decrypting:
...ANSWER
Answered 2018-Jul-25 at 15:47Explanation
In your code, you have created a variable named include_vars
, a dictionary with a key file
and a string value group_vars/passes
.
Solution
The correct syntax to define vars_files in a play is vars_files
declaration:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install vaulted
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page