Hi there,
I had the task to install Jira service desk for one team. I was unpleasantly surprised by the level of automation around the binary installation.
The goal was to automate the Jira Service Desk setup on Linux Ubuntu 16.04 with ansible and openstack. Unfortunately I could not find much about the binary installer parameters. Especially about the --varfile and how to use it to automate the human interaction.
I was able to use the python expect module to answer the interactive questions (have a look at the “install atlassian service desk” task), but there has to be another way…
---
- name: download the atlassian service desk binary for Linux
get_url:
url: https://product-downloads.atlassian.com/software/jira/downloads/atlassian-servicedesk-3.9.0-x64.bin
dest: /tmp/servicedesk.bin
mode: 0755
checksum: md5:9ec1696692c43daad380708724a127b5
- name: install pexpect requirement for interactive installer
apt: name=python-pexpect state=latest
- name: install atlassian service desk
expect:
command: /tmp/servicedesk.bin -c
responses:
'OK \[o, Enter\], Cancel \[c\]': "o"
'Express Install': "1"
'Install \[i, Enter\], Exit \[e\]': "i"
'Yes \[y, Enter\], No \[n\]': "y"
timeout: 600
echo: yes
creates: /opt/atlassian/jira/install.reg
- name: install postgres sql database
apt: name={{ item }} state=latest
with_items:
- postgresql
- postgresql-contrib
- python-psycopg2
- name: create database
postgresql_db:
name: servicedesk
become_user: postgres
- name: configure postgres
postgresql_user:
db: servicedesk
name: atlassian
encrypted: yes
password: a-very-secret-password
role_attr_flags: SUPERUSER
become_user: postgres
Same question goes for the configuration of the newly installed instance, I would like to parametrize the configuration through ansible templates. I would like to automatically setup LDAP…
Any hints?
Eric