This role permits to install/configure a basic development environment.
-
Installs and configures :
-
some basic packages
-
some basic config files
-
docker, docker-compose, docker-machine
-
packer, vagrant, terraform
-
ssh config files
-
Get the code source :
$ git clone <REPO_URL> /local/pathSensitive data and variables are located in "vaulted" files inside the vars directory.
If you want to reuse this role, you must create your vaulted files with your own data and "vault" them with your own password.
You have to create three vaulted files inside a vars directory (not "versioned" files) :
-
common-vars.yml.vault: containing common variables -
sshconfig.yml.vault: containing SSH config variables -
work-vars.yml.vault: containing work specific variables
$ ansible-vault create vars/common-vars.yml.vaultExample of common-vars.yml.vault file content :
--- user: name: mikl fullName: Michael Pailloncy email: michael.pailloncy@gmail.com home: /home/mikl cachedir: /home/mikl/.ansible-cache tools: path: /home/mikl/tools proxy: host: my-work-proxy.hostname
$variables by your specific values
By default, resetenv script will search a file named .vault-password containing your password and use it to "unvault" your data.
You need to create it inside resetenv directory :
$ echo "yourP@ssw0rd" > .vault-password$ ansible-vault create vars/sshconfig.yml.vaultExample of sshconfig.yml.vault file content :
--- sshconfig: hosts: host1: > Host host1 HostName hostname1 User userhost1 host2: > Host host2 HostName hostname2 User userhost2 ...
$ ansible-vault create vars/work-vars.yml.vaultExample of work-vars.yml.vault file content :
--- user: name: mikl fullName: Michael Pailloncy email: work-email@company.fr home: /home/mikl docker_internal_registry: "my-internal-docker-registry.hostname" proxy: host: $workProxyHost port: $workProxyPort user: $workProxyUsername password: $workProxyPassword proxy_env: http_proxy: 'http://{{ proxy.user }}:{{ proxy.password }}@{{ proxy.host }}:{{ proxy.port }}' https_proxy: 'http://{{ proxy.user }}:{{ proxy.password }}@{{ proxy.host }}:{{ proxy.port }}' no_proxy: '127.0.0.1,$internalDockerRegistryHostname'
$variables by your specific values
$ ./resetenvansible-playbook options to resetenv shell script. Example: resetenv -t fast for a fast and basic reconfiguration (using fast tag).
After a first full provisioning has been done, the only way I’m using resetenv is to reset basic configuration files (docker, dnf, http_proxy settings) depending on my current location (work vs home).
Examples :
$ r -t fastor more often :
$ tworkThis command is an alias to do a resetenv -t fast and start tmunixator directly configured depending on my location (see templates/zshrc and templates/tmuxinator/work.yml).