As per today, I have the following role, this role simulate a basic installation of the product:
- name: Install Server.msi primary_appserver
ansible.windows.win_package:
path: C:\product.msi
log_path: C:\InstallProduct.log
arguments:
ADDLOCAL=DB,Agent
state: present
become: true
become_method: runas
vars:
ansible_become_user: "{{ ansible_user }}"
ansible_become_password: "{{ ansible_password }}"
when: "'primary_appservers' in group_names"
I want to simulate an "advanced" installation, which I select additional feature in the Installation wizard
I the installation wizard, I can select one or more features, meaining ADDLOCAL argumnet can be: ADDLOCAL=DB,Agent - that's the basic OR ADDLOCAL=DB,Agent,Feature_A OR ADDLOCAL=DB,Agent,Feature_A,Feature_B
Things are become complicated for me, since Feature_C for example demands additional arguments list to install it for example: RABBIT_LOCAL_PORT, RABBIT_QUEUE_NAME, RABBIT_TTL...
Using vars in Ansible or extraVars in Jenkins - overwrite the values in the playbook\role
Is there a way to add the value to the existing value in the playbook\role, so for example when I select to install Feature_a and\or Feature_b - ADDLOCAL value in the role will changed into ADDLOCAL=DB,Agent,Feature_A,Feature_B? or in the second case when I add Feature_C, the ADDLOCAL value in the role will changed into ADDLOCAL=DB,Agent,Feature_C and arguments key will include in addition: RABBIT_LOCAL_PORT, RABBIT_QUEUE_NAME, RABBIT_TTL arguments?