ansible-cfg median
ln -s /usr/local/etc/epi/inventory
ln -s /usr/local/etc/epi/data
. <(use-ansible)
helper run init-play-dir
ansible-galaxy install -r requirements.yml
Use ansible-cfg
mkdir -p ext
git -C ext clone git@github.com:thydel/ansible-cfg.git
make -C ext/ansible-cfg install
Generate config
ansible-cfg.mk median
Update .gitignore
ansible localhost -m setup -a filter=ansible_env | grep PWD # fill the cache with current PWD
ansible-cfg.yml -e dir=$(pwd) # or tell ansible
The paths.yml
file define relative paths for
private_repos_file
arequirement.yml
like file for private data reposkeys_file
to definedefault_key
, the default ssh key for private reposworkdir
where to clone private data repos
In your private_repos_file
define choose repos for
inventories
password-store
- others private requested repos (starting from private
infra-data-repos
) - Optionnaly define
gpg-store
e.g. I do
cp ~/usr/thydel.d/ssh-config/keys.yml .
cp ~/usr/epipar.d/infra-data-repos/private-repos.yml . # Then edit to keep what I need
You can also start from skeleton
git -C ext clone git@github.com:thydel/ansible-get-priv-repos.git
make -C ext/ansible-get-priv-repos install
Get repos
get-priv-repos.yml -e dir=$(pwd)
get-priv-repos.yml
use paths.yml
to access private_repos_file
,
keys_file
and workdir
.
make -C ext/inventories undone
make -C ext/inventories
rsync -av ext/inventories/inventory .
make -C ext/ips
make -C ext/ips diff