The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
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-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
December 8, 2020

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