Setup:
Samsung Galaxy Tab S5e SM-T720
Android Pie on Linux 4.9.112 (not rooted)
Termux
I've been using a lot of Ansible lately and while almost everything has been great, finding a clean way to implement ansible-vault wasn't immediately apparent.
What I decided on was the following: put your secret information into a vars
file, reference that vars
file from your task
, and encrypt the whole vars
file using ansible-vault encrypt
.
Let's use an example: You're writing an Ansible role and want to encrypt the spoiler for the movie Aliens.
This is a little trick I use to spin up the packages instalation on Debian/Ubuntu boxes in Vagrant.
I add a simple function that checks if a directory named something similar to ~/.vagrant.d/cache/apt/opscode-ubuntu-12.04/partial
(it may have another path in Windows or MacOS) and create the directory if it doesn't already exist.
def local_cache(basebox_name)
cache_dir = Vagrant::Environment.new.home_path.join('cache', 'apt', basebox_name)
partial_dir = cache_dir.join('partial')
partial_dir.mkdir unless partial_dir.exist?
cache_dir
cd k8s-specs | |
git pull | |
export AWS_ACCESS_KEY_ID=[...] | |
export AWS_SECRET_ACCESS_KEY=[...] | |
aws --version |
#!/usr/bin/env bash | |
# To run: | |
# $ brew uninstall s3cmd && brew install s3cmd --HEAD | |
# $ s3cmd --configure # fill in w/ amazon account vars | |
# $ cd path/to/local/static/site | |
# $ wget https://gist.githubusercontent.com/tomfuertes/9175005/raw/make-website.sh | |
# $ bash make-website.sh | |
# | |
# NOTE: cfcreate takes ~15 minutes to run on AWS. |
# Bootstrap script for use with http://boxstarter.org/ | |
# To use append the URL to the raw snippet to http://boxstarter.org/package/nr/url? | |
# (e.g. http://boxstarter.org/package/nr/url?https://gist.githubusercontent.com/mikemoate/0915288fff447b640cdb/raw/83b32099ea8f21d06604ae70003312b7492b8cd8/boxstarter-script-work) | |
# NOTE: You may see errors from some packages if you have already installed the software before using boxstarter. | |
# (some MSI's handle this badly and so exit with the wrong code, I've seen this for HipChat, RoyalTS, Virtualbox and Vagrant) | |
# Windows settings | |
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions -EnableShowFullPathInTitleBar | |
Set-TaskbarOptions -Size Small -Lock -Dock Bottom |
Long story short, ansible does not work on a Windows control machine, so you basically have to:
ansible --connection=local ...
in the target vmBelow are Vagrantfile
examples for both approaches
<?xml version="1.0" encoding="utf-8"?> | |
<unattend xmlns="urn:schemas-microsoft-com:unattend"> | |
<settings pass="windowsPE"> | |
<component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"> | |
<SetupUILanguage> | |
<UILanguage>en-US</UILanguage> | |
</SetupUILanguage> | |
<InputLocale>en-US</InputLocale> | |
<SystemLocale>en-US</SystemLocale> | |
<UILanguage>en-US</UILanguage> |