|
|
|
@ -1,23 +1,7 @@ |
|
|
|
|
--- |
|
|
|
|
|
|
|
|
|
- name: Install dependencies |
|
|
|
|
yum: |
|
|
|
|
name: |
|
|
|
|
- openssl-devel |
|
|
|
|
- openldap-devel |
|
|
|
|
- libxml2-devel |
|
|
|
|
- expat-devel |
|
|
|
|
- mariadb-devel |
|
|
|
|
- libapreq2-devel |
|
|
|
|
- gcc |
|
|
|
|
- perl-App-cpanminus |
|
|
|
|
- gettext # To build I18N files |
|
|
|
|
- pwgen # To generate random secrets |
|
|
|
|
- java-1.8.0-openjdk-headless # For keytool utility |
|
|
|
|
- systemd-devel # Needed for Log::Log4perl::Appender::Journald |
|
|
|
|
- MySQL-python # To create and manage the MySQL DB |
|
|
|
|
- mysql # To load the schema |
|
|
|
|
- patch # To apply local patches |
|
|
|
|
yum: name={{ pki_packages }} |
|
|
|
|
tags: pki |
|
|
|
|
|
|
|
|
|
- name: Download OpenXPKI |
|
|
|
@ -68,16 +52,9 @@ |
|
|
|
|
when: pki_install_mode == 'upgrade' |
|
|
|
|
tags: pki |
|
|
|
|
|
|
|
|
|
- name: Install perl modules needed to run the build |
|
|
|
|
cpanm: |
|
|
|
|
name: "{{ item }}" |
|
|
|
|
locallib: "{{ pki_root_dir }}" |
|
|
|
|
with_items: |
|
|
|
|
- Config::Std |
|
|
|
|
- Fatal |
|
|
|
|
tags: pki |
|
|
|
|
|
|
|
|
|
- name: Install perl module without tests |
|
|
|
|
- when: pki_install_mode != 'none' |
|
|
|
|
block: |
|
|
|
|
- name: Install perl module without tests |
|
|
|
|
cpanm: |
|
|
|
|
name: "{{ item }}" |
|
|
|
|
locallib: "{{ pki_root_dir }}" |
|
|
|
@ -85,9 +62,9 @@ |
|
|
|
|
with_items: |
|
|
|
|
- Git::PurePerl |
|
|
|
|
- Connector # This module tries to fetch web content without checking proxy from env |
|
|
|
|
tags: pki |
|
|
|
|
- Net::Server # 2 tests are failing on el8 t/SSL_test.t and t/SSLEAY_test.t |
|
|
|
|
|
|
|
|
|
- name: Install OpenXPKI dependencies |
|
|
|
|
- name: Install OpenXPKI dependencies |
|
|
|
|
cpanm: |
|
|
|
|
locallib: "{{ pki_root_dir }}" |
|
|
|
|
installdeps: True |
|
|
|
@ -95,66 +72,50 @@ |
|
|
|
|
environment: |
|
|
|
|
PERL5LIB: "{{ pki_root_dir }}/lib/perl5" |
|
|
|
|
PATH: "{{ pki_root_dir }}/bin:{{ ansible_env.PATH }}" |
|
|
|
|
tags: pki |
|
|
|
|
|
|
|
|
|
- name: Build OpenXPKI |
|
|
|
|
cpanm: |
|
|
|
|
locallib: "{{ pki_root_dir }}" |
|
|
|
|
from_path: "{{ pki_root_dir }}/src/openxpki-{{ pki_version }}/core/server" |
|
|
|
|
notest: True |
|
|
|
|
when: pki_install_mode != 'none' |
|
|
|
|
environment: |
|
|
|
|
PERL5LIB: "{{ pki_root_dir }}/lib/perl5" |
|
|
|
|
PATH: "{{ pki_root_dir }}/bin:{{ ansible_env.PATH }}" |
|
|
|
|
tags: pki |
|
|
|
|
|
|
|
|
|
- name: Install additional perl modules |
|
|
|
|
- name: Install additional perl modules |
|
|
|
|
cpanm: |
|
|
|
|
name: "{{ item }}" |
|
|
|
|
locallib: "{{ pki_root_dir }}" |
|
|
|
|
with_items: |
|
|
|
|
- Devel::CheckLib # Needed to build BDB::mysql >= 4.047 |
|
|
|
|
- DBD::mysql |
|
|
|
|
- Log::Log4perl::Appender::Journald |
|
|
|
|
- Log::Log4perl::Appender::Screen # Log::Log4perl::Appender::Journald is broken on systemd > 209 |
|
|
|
|
- Data::Dump # Needed for the external ldap auth script |
|
|
|
|
- String::Escape # Needed for the external ldap auth script |
|
|
|
|
tags: pki |
|
|
|
|
- TINITA/YAML-1.30.tar.gz |
|
|
|
|
|
|
|
|
|
- name: Install OpenXPKI |
|
|
|
|
- name: Build OpenXPKI |
|
|
|
|
cpanm: |
|
|
|
|
locallib: "{{ pki_root_dir }}" |
|
|
|
|
from_path: "{{ pki_root_dir }}/src/openxpki-{{ pki_version }}/core/server" |
|
|
|
|
notest: True |
|
|
|
|
environment: |
|
|
|
|
PERL5LIB: "{{ pki_root_dir }}/lib/perl5" |
|
|
|
|
PATH: "{{ pki_root_dir }}/bin:{{ ansible_env.PATH }}" |
|
|
|
|
|
|
|
|
|
- name: Install OpenXPKI |
|
|
|
|
command: make install |
|
|
|
|
args: |
|
|
|
|
chdir: "{{ pki_root_dir }}/src/openxpki-{{ pki_version }}/core/server" |
|
|
|
|
when: pki_install_mode != 'none' |
|
|
|
|
notify: restart openxpki |
|
|
|
|
tags: pki |
|
|
|
|
|
|
|
|
|
- name: Install OpenXPKI CGI::Session driver |
|
|
|
|
copy: |
|
|
|
|
src: "{{ pki_root_dir }}/src/openxpki-{{ pki_version }}/core/server/CGI_Session_Driver/openxpki.pm" |
|
|
|
|
dest: "{{ pki_root_dir }}/lib/perl5/CGI/Session/Driver/openxpki.pm" |
|
|
|
|
remote_src: True |
|
|
|
|
tags: pki |
|
|
|
|
|
|
|
|
|
# This is needed so the build-pot.pl script finds msg labels in config |
|
|
|
|
# during the make scan step in next task |
|
|
|
|
- name: Copy default conf in server source directory |
|
|
|
|
- name: Copy default conf in server source directory |
|
|
|
|
synchronize: |
|
|
|
|
src: "{{ pki_root_dir }}/src/openxpki-config-{{ pki_config_version }}/" |
|
|
|
|
dest: "{{ pki_root_dir }}/src/openxpki-{{ pki_version }}/config/" |
|
|
|
|
recursive: True |
|
|
|
|
delete: True |
|
|
|
|
delegate_to: "{{ inventory_hostname }}" |
|
|
|
|
when: pki_install_mode != 'none' |
|
|
|
|
tags: pki |
|
|
|
|
|
|
|
|
|
- name: Scan, build and install translations |
|
|
|
|
- name: Scan, build and install translations |
|
|
|
|
shell: make scan && make && make install LOCALE_DIR={{ pki_root_dir }}/locale |
|
|
|
|
args: |
|
|
|
|
chdir: "{{ pki_root_dir }}/src/openxpki-{{ pki_version }}/core/i18n" |
|
|
|
|
when: pki_install_mode != 'none' |
|
|
|
|
tags: pki |
|
|
|
|
|
|
|
|
|
- name: Install the web UI |
|
|
|
|
- name: Install the web UI |
|
|
|
|
synchronize: |
|
|
|
|
src: "{{ pki_root_dir }}/src/openxpki-{{ pki_version }}/core/server/{{ item }}" |
|
|
|
|
dest: "{{ pki_root_dir }}/web/" |
|
|
|
@ -163,9 +124,17 @@ |
|
|
|
|
with_items: |
|
|
|
|
- cgi-bin |
|
|
|
|
- htdocs |
|
|
|
|
when: pki_install_mode != 'none' |
|
|
|
|
|
|
|
|
|
tags: pki |
|
|
|
|
|
|
|
|
|
- name: Install OpenXPKI CGI::Session driver |
|
|
|
|
copy: |
|
|
|
|
src: "{{ pki_root_dir }}/src/openxpki-{{ pki_version }}/core/server/CGI_Session_Driver/openxpki.pm" |
|
|
|
|
dest: "{{ pki_root_dir }}/lib/perl5/CGI/Session/Driver/openxpki.pm" |
|
|
|
|
remote_src: True |
|
|
|
|
tags: pki |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Fix relative URL in the index page |
|
|
|
|
command: sed -i -e 's|/openxpki/|{{ pki_web_alias }}|g' {{ pki_root_dir }}/web/htdocs/default.html |
|
|
|
|
changed_when: False |
|
|
|
@ -217,7 +186,7 @@ |
|
|
|
|
login_password: "{{ mysql_admin_pass }}" |
|
|
|
|
when: |
|
|
|
|
- pki_install_mode == 'install' |
|
|
|
|
- pki_db.changed |
|
|
|
|
- db_created.changed |
|
|
|
|
tags: pki |
|
|
|
|
|
|
|
|
|
- name: Copy additional sql scripts |
|
|
|
@ -270,6 +239,7 @@ |
|
|
|
|
copy: src=upgrade_to_v{{ item }}.sql dest={{ pki_root_dir }}/src/openxpki-config-{{ pki_config_version }}/contrib/sql/ |
|
|
|
|
loop: |
|
|
|
|
- '3.4' |
|
|
|
|
- '3.8' |
|
|
|
|
tags: pki |
|
|
|
|
|
|
|
|
|
- name: Apply db upgrades |
|
|
|
@ -282,6 +252,7 @@ |
|
|
|
|
login_password: "{{ mysql_admin_pass }}" |
|
|
|
|
loop: |
|
|
|
|
- '3.4' |
|
|
|
|
- '3.8' |
|
|
|
|
when: |
|
|
|
|
- pki_install_mode == 'upgrade' |
|
|
|
|
- pki_current_version is version(item, '<') |
|
|
|
|