I have a product that I can install it first, then update it - meaning to add more feature to my base product
I do it by execute the MSI first time, then going to Add \ Remove Programs and when selecting the product, you can click "Change" and the Installation Wizard would shown up again, allowing you to select and install additional feature in the product
I created 2 ansible roles and playbooks for this mission
First role uses ansible.windows.win_package to install the base product (see below example)
- 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"
Second role uses ansible.windows.win_package again with different ADDLOCAL arguments (the additional features):
- name: Install Engine primary_appserver
ansible.windows.win_package:
path: C:\product.msi
log_path: C:\InstallEngine.log
arguments:
ADDLOCAL=Engine
state: present
become: true
become_method: runas
vars:
ansible_become_user: "{{ ansible_user }}"
ansible_become_password: "{{ ansible_password }}"
when: "'primary_appservers' in group_names"
First role is work fine and executes the msi file, The second one - not
If I do those two tasks, with CLI, msiexec /i it's work fine
So, Why it is not working when performing ansible.windows.win_package?