Yes, I'm using jinja2 template:
- name: Write the web agent properties file for installation
template: src=ca-wa-installer.properties.j2 dest={{ temp_dir }}/ca-wa-installer.properties mode=0755
tags: smwa
- name: Execute the web agent silent install
shell: ./{{ smwa_installer }} -i silent -f {{ temp_dir }}/ca-wa-installer.properties executable=/bin/bash chdir={{ temp_dir }} creates={{ wa_install_dir }}
tags: smwa
I'm not sure if we can attach files here, but here is a snippet of my ca-wa-installer.properties.j2:
USER_INSTALL_DIR={{ wa_install_dir }}
USER_SHORTCUTS=/root
HOST_REGISTRATION_YES={{ wa_host_reg }}
ADMIN_REG_NAME={{ wa_admin_name }}
DEFAULT_ADMIN_REG_PASSWORD={{ siteminder_password }}
SHARED_SECRET_ROLLOVER_YES={{ wa_secret_rollover }}
TRUSTED_HOST_NAME={{ wa_trusted_hostname }}
CONFIG_OBJ={{ default_hco }}
{% if hostvars[groups['pstore'][0]].internal_lb is defined %}
IP_ADDRESS_STRING={{ hostvars[groups['pstore'][0]].internal_lb }}
{% elif groups['smps']|length == 1 %}
IP_ADDRESS_STRING={{ ps_server }}
{% else %}
IP_ADDRESS_STRING={{ groups['smps'] | join(",") }}
{% endif %}
FIPS_VALUE={{ fips }}
SM_HOST_FILENAME={{ wa_smhost_file }}
SM_HOST_DIR={{ wa_smhost_dir }}
APACHE_SELECTED=1
APACHE_WEBSERVER_ROOT={{ wa_apache_root }}
APACHE_SPECIFIC_PATH_YES=
APACHE_VENDOR_TYPE=HTTP_APACHE
APACHE_VERSION={{ wa_apache_version }}
WEB_SERVER_INFO=Apache,{{ wa_apache_root }}/conf,Apache {{ wa_apache_version }},+EMPTYSTR+,apache,{{ wa_apache_version }},{{ wa_apache_root }},Unix,+EMPTYSTR+,1,1,0,0,0,1,No advanced authentication,{{ wa_aco }},0,undefined,ENC:...==,
ENABLE_WEBAGENT_RESULT={{ wa_enable_agent }}
AGENT_CONFIG_OBJ={{ wa_aco }}