Open nicoklaus15 opened 3 months ago
One straight up solution that comes to the mind is specializing the default vars to windows_gitlab_runner_install_directory
but he's right in a way: we don't want to have the Windows directory fixed and it's only used in the windows playbook
I posted this to the ansible forum
https://forum.ansible.com/t/include-default-variables-based-on-conditions/8433/2
and there could be one interesting solution:
mysql_community_packages: "{{ lookup('ansible.builtin.vars', 'mysql_community_packages_' + os_version, default='mysql-server') }}"
mysql_community_packages_redhat9:
- mysql
- mysql-server
- mysql-common
I'll give this a try when time and come back to you
Is there any news ?
Sorry, I didn't have the time yet to try that out.
Under Windows, it is a common practice to use different partitions or hard disks to prevent applications from overloading the main hard disk and crashing the system. GitLab Runner is also a good candidate to fill up the disk and crash the computer. Therefore, it would be helpful to install it on a separate hard disk, but at the moment this is not possible due to variable precedence.
https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_variables.html#understanding-variable-precedence
Therefore, the installation directory should be moved to the defaults and then this can be changed in the inventory for each host or globally.