Skip to content

Instantly share code, notes, and snippets.

@disassembler
Created September 18, 2017 01:53
Show Gist options
  • Save disassembler/979e4bc5ece042226425c831f2a367b4 to your computer and use it in GitHub Desktop.
Save disassembler/979e4bc5ece042226425c831f2a367b4 to your computer and use it in GitHub Desktop.
with import <nixpkgs> { };
stdenv.mkDerivation rec {
name = "Work_Environment";
buildInputs = [
pythonPackages.Fabric
pythonPackages.pyyaml
pythonPackages.requests
ansible
];
shellHook = ''
export EDITOR=nvim
echo "Work Environment" \
| ${pkgs.figlet}/bin/figlet -f banner -c \
| ${pkgs.lolcat}/bin/lolcat
cat <<EOF
Instructions for modifying encrypted hiera values:
$ eyaml edit <hiera_file>
Instructions for Running fabric tasks:
$ fab -l
$ fab -d <task>
$ fab loadenv:environment=wyselab <task>
Instructions for running ansible only on staging:
$ ansible-playbook -i hosts --limit staging site.yml
Instructions for running ansible only on prod:
$ ansible-playbook -i hosts --limit prod site.yml
Instructions for running ansible on all hosts:
$ ansible-playbook -i hosts site.yml
EOF
'';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment