Base rol to install programs
None
-
remove_git
: Boolean to remove the.git
directory (Default:False
) -
local_fetch
: Boolean to fetch the configurations in the machine running ansible instead of in the target server (Default:False
) -
install
: Dictionary with the information of the program to installpackages
: List of packages to install with the package managerpip_packages
: List of pip packages to installpip3_packages
: List of pip3 packages to install
-
config
: Dictionary with the information of the configurationdirectory
: Base directory to perform the clone of the configuration directory, for example:~/.rcfiles
.git_repo
: Url to the git group of repositories of your dotfiles, for example:https://git.myrepo.com/rcfiles
.packages
: List of packages to configure
Imagine that we've set
config:
directory: ~/.rcfiles
git_repo: https://git.myrepo.com/rcfiles
packages:
- package_1
- package_2
The configuration part will clone https://git.myrepo.com/rcfiles/package_1 and
https://git.myrepo.com/rcfiles/package_2 into ~/.rcfiles/package_1
and
~/.rcfiles/package_2
.
It assumes that in each of those repositories you have the same structure that you'd have on your home directory, so for example
$ tree -a ~/.rcfiles/package_1
├── .local
│ └── share
│ └── package_1_dir
└── .package1_rc
- hosts: all
roles:
- generic_program_install
To test the role you need molecule.
molecule test --all
There are two test cases:
default
: Tests normal usage with full featuresno_config
: Tests the case where no configuration is done
- Refactor to avoid duplicated code, keeping in mind the
~/.config
and/.local/share
cases
GPLv2
Lyz ([email protected])