mono-infrastructure/ansible/playbooks/tasks/bugzilla_install.yml

55 lines
1.3 KiB
YAML
Raw Normal View History

2021-04-24 08:15:27 +00:00
---
# Install bugzilla properly, including modules and stuff
- name: Check for a localconfig file
stat:
2021-04-24 08:19:07 +00:00
path: "{{ bugzilla_dir }}/localconfig"
2021-04-24 08:15:27 +00:00
register: conf_result
- name: Deploy answer file
template:
src: "var/www/bugzilla/answer"
2021-04-24 08:19:07 +00:00
dest: "{{ bugzilla_dir }}/answer"
2021-04-24 08:15:27 +00:00
owner: root
group: apache
mode: "0640"
when: not conf_result.stat.exists
- name: Run checksetup.pl
shell: "set -o pipefail && /usr/bin/perl checksetup.pl /var/www/bugzilla/answer"
2021-04-24 08:19:07 +00:00
chdir: "{{ bugzilla_dir }}"
2021-04-24 08:15:27 +00:00
changed_when: "1 != 1"
when: not conf_result.stat.exists
- name: Deploy proper configuration
template:
src: "var/www/bugzilla/localconfig.j2"
2021-04-24 08:19:07 +00:00
dest: "{{ bugzilla_dir }}/localconfig"
2021-04-24 08:15:27 +00:00
owner: root
group: apache
mode: '0640'
- name: Install the proper modules
shell: "set -o pipefail && /usr/bin/perl install-module.pl {{ item }}"
2021-04-24 08:19:07 +00:00
chdir: "{{ bugzilla_dir }}"
2021-04-24 08:15:27 +00:00
changed_when: "1 != 1"
with_items:
- 'Net::SAML2'
- 'HTML::FormatText::WithLinks'
- 'PatchReader'
- 'Crypt::OpenSSL::Verify'
- 'Crypt::OpenSSL::RSA'
- 'JSON::RPC'
- 'XML::Twig'
- 'Template::Plugin::GD::Image'
- name: Re-run checksetup.pl
shell: "set -o pipefail && /usr/bin/perl checksetup.pl"
2021-04-24 08:19:07 +00:00
chdir: "{{ bugzilla_dir }}"
2021-04-24 08:15:27 +00:00
changed_when: "1 != 1"
- name: Remove answer file
file:
2021-04-24 08:19:07 +00:00
path: "{{ bugzilla_dir }}/answer"
2021-04-24 08:15:27 +00:00
state: absent