Facing issue with JIRA upgradation using ansible playbook

RITISH RANJAN KHAN December 7, 2020

Hello Team,

I have started writing ansible script for JIRA upgradation on localhost and getting the below error,

- name: Create response.varfile
file:
path: "{{ jira_download_dir }}/response.varfile"
state: touch
mode: 0755

- name: Fill response.varfile
lineinfile:
path: "{{ jira_download_dir }}/response.varfile"
line: "{{ item.line }}"
state: present
create: yes
with_items:
- { line: 'backupJira$Boolean=true' }
- { line: 'app.install.service$Boolean=false' }
- { line: 'existingInstallationDir=/usr/local/JIRA Software' }
- { line: 'app.jiraHome=/var/atlassian/application-data/jira' }
- { line: 'sys.confirmedUpdateInstallationString=true' }
- { line: 'sys.languageId=en' }
- { line: 'sys.installationDir=/opt/atlassian/jira' }
- { line: 'executeLauncherAction$Boolean=true' }
- { line: 'httpPort$Long=8080' }
- { line: 'portChoice=default' }

- name: Executing jira upgradation
command: "{{ jira_download['dest'] }} -q -varfile /tmp/response.varfile"

Below Issue I am facing in the step "Executing jira upgradation",

fatal: [localhost]: FAILED! => {
"changed": true,
"cmd": [
"/tmp/atlassian-jira-software-8.1.0-x64.bin",
"-q",
"-varfile",
"/tmp/response.varfile"
],
"delta": "0:00:03.502487",
"end": "2020-12-08 12:02:18.707628",
"invocation": {
"module_args": {
"_raw_params": "/tmp/atlassian-jira-software-8.1.0-x64.bin -q -varfile /tmp/response.varfile",
"_uses_shell": false,
"argv": null,
"chdir": null,
"creates": null,
"executable": null,
"removes": null,
"stdin": null,
"stdin_add_newline": true,
"strip_empty_ends": true,
"warn": true
}
},
"msg": "non-zero return code",
"rc": 1,
"start": "2020-12-08 12:02:15.205141",
"stderr": "No directory found in specified location",
"stderr_lines": [
"No directory found in specified location"
],
"stdout": "Unpacking JRE ...\nStarting Installer ...",
"stdout_lines": [
"Unpacking JRE ...",
"Starting Installer ..."
]
}

Note: 

  • {{ jira_download_dir }} is /tmp
  • JIRA service has been stopped

1 answer

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 8, 2020

It is probably what it says it is - the directory you have told it to use is not there, or the process owner does not have write and execute permissions on it.

RITISH RANJAN KHAN December 8, 2020

Hello @Nic Brough -Adaptavist- ,

After changing the owner and group of the files, still facing the same issue. 

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 8, 2020

Then your code is looking for the wrong directory, or it's not creating the directory it needs to.

Suggest an answer

Log in or Sign up to answer