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

61 lines
1.4 KiB
YAML
Raw Permalink 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
2021-04-24 08:26:37 +00:00
shell: "set -o pipefail && /usr/bin/perl checksetup.pl {{ bugzilla_dir }}/answer"
args:
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 }}"
changed_when: "1 != 1"
2021-04-24 08:26:37 +00:00
args:
chdir: "{{ bugzilla_dir }}"
2021-04-24 08:15:27 +00:00
with_items:
- 'Net::SAML2'
2021-04-24 10:18:11 +00:00
- 'Template'
- 'Template::Plugin::GD::Image'
2021-04-24 08:15:27 +00:00
- 'HTML::FormatText::WithLinks'
- 'PatchReader'
- 'Crypt::OpenSSL::Verify'
- 'Crypt::OpenSSL::RSA'
- 'JSON::RPC'
- 'XML::Twig'
2021-04-25 17:18:18 +00:00
- 'Test::Taint'
2021-04-24 08:15:27 +00:00
- name: Re-run checksetup.pl
shell: "set -o pipefail && /usr/bin/perl checksetup.pl"
2021-04-24 08:26:37 +00:00
args:
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
...