mcgrof.devconfig
devconfig
==========
The devconfig role allows you to set up your shell environment on target systems with your usual user preferences. For instance, if you have a ~/.gitconfig file, it will copy that file to every target system you use with Ansible. Similarly, if you have favorite bash commands or shortcuts, you can place them in the ~/.enhance-bash file, and devconfig will make sure each target system includes this file in their .bashrc for both regular users and the root user.
All these actions are optional. Files will only be copied or changed if they exist.
Requirements
None.
Role Variables
data_home_dir: the home directory for each host, defaults to/home/vagrantdev_gitconfig_src: your local.gitconfigfiledev_gitconfig_dest: where to copy the.gitconfigon the target systemdev_bash_config: the.bashrcfile useddev_bash_config_root: the.bashrcfor the root userdev_bash_config_hacks_name: the name for your bash hacks file, default is "enhance-bash"dev_bash_config_hacks_src: if the above is "enhance-bash", this is~/.enhance-bashdev_bash_config_hacks_generic: the generic name for the hacks filedev_bash_config_hacks_dest: where to copy the hacks file on the target systemdev_bash_config_hacks_root: where to copy the hacks file for the root userdevconfig_try_refresh_repos: option to refresh your repositories?devconfig_try_upgrade: option to update your system?devconfig_try_install_kdevtools: option to install kernel development tools?devconfig_repos_addon: set to true to enable additional repositoriesdevconfig_repos_addon_list: list of repositories to use
You can also have optional configuration files like debian.yml, suse.yml, or redhat.yml. Below are specific variables for different distributions. Some of these can be specific to a distribution or included in an optional user secret.yml file.
suse_register_system: if set to true, it will try to register your systemsuse_registration_code: registration code to use
Dependencies
None.
Example Playbook
Here’s an example of how to use it in a playbook:
---
- hosts: all
roles:
- role: devconfig
For more examples, check out one of the users of this role, like the kdevops project or the oscheck project, where this code originated.
License
GPLv2
Configure target hosts with your preferred development hacks
ansible-galaxy install mcgrof.devconfig