|
|
@ -1,23 +1,7 @@ |
|
|
|
--- |
|
|
|
--- |
|
|
|
|
|
|
|
|
|
|
|
- name: Install dependencies |
|
|
|
- name: Install dependencies |
|
|
|
yum: |
|
|
|
yum: name={{ pki_packages }} |
|
|
|
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 |
|
|
|
|
|
|
|
tags: pki |
|
|
|
tags: pki |
|
|
|
|
|
|
|
|
|
|
|
- name: Download OpenXPKI |
|
|
|
- name: Download OpenXPKI |
|
|
@ -68,15 +52,8 @@ |
|
|
|
when: pki_install_mode == 'upgrade' |
|
|
|
when: pki_install_mode == 'upgrade' |
|
|
|
tags: pki |
|
|
|
tags: pki |
|
|
|
|
|
|
|
|
|
|
|
- name: Install perl modules needed to run the build |
|
|
|
- when: pki_install_mode != 'none' |
|
|
|
cpanm: |
|
|
|
block: |
|
|
|
name: "{{ item }}" |
|
|
|
|
|
|
|
locallib: "{{ pki_root_dir }}" |
|
|
|
|
|
|
|
with_items: |
|
|
|
|
|
|
|
- Config::Std |
|
|
|
|
|
|
|
- Fatal |
|
|
|
|
|
|
|
tags: pki |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Install perl module without tests |
|
|
|
- name: Install perl module without tests |
|
|
|
cpanm: |
|
|
|
cpanm: |
|
|
|
name: "{{ item }}" |
|
|
|
name: "{{ item }}" |
|
|
@ -85,7 +62,7 @@ |
|
|
|
with_items: |
|
|
|
with_items: |
|
|
|
- Git::PurePerl |
|
|
|
- Git::PurePerl |
|
|
|
- Connector # This module tries to fetch web content without checking proxy from env |
|
|
|
- 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: |
|
|
|
cpanm: |
|
|
@ -95,18 +72,6 @@ |
|
|
|
environment: |
|
|
|
environment: |
|
|
|
PERL5LIB: "{{ pki_root_dir }}/lib/perl5" |
|
|
|
PERL5LIB: "{{ pki_root_dir }}/lib/perl5" |
|
|
|
PATH: "{{ pki_root_dir }}/bin:{{ ansible_env.PATH }}" |
|
|
|
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: |
|
|
|
cpanm: |
|
|
@ -115,25 +80,25 @@ |
|
|
|
with_items: |
|
|
|
with_items: |
|
|
|
- Devel::CheckLib # Needed to build BDB::mysql >= 4.047 |
|
|
|
- Devel::CheckLib # Needed to build BDB::mysql >= 4.047 |
|
|
|
- DBD::mysql |
|
|
|
- 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 |
|
|
|
- Data::Dump # Needed for the external ldap auth script |
|
|
|
- String::Escape # 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: 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 |
|
|
|
- name: Install OpenXPKI |
|
|
|
command: make install |
|
|
|
command: make install |
|
|
|
args: |
|
|
|
args: |
|
|
|
chdir: "{{ pki_root_dir }}/src/openxpki-{{ pki_version }}/core/server" |
|
|
|
chdir: "{{ pki_root_dir }}/src/openxpki-{{ pki_version }}/core/server" |
|
|
|
when: pki_install_mode != 'none' |
|
|
|
|
|
|
|
notify: restart openxpki |
|
|
|
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 |
|
|
|
# This is needed so the build-pot.pl script finds msg labels in config |
|
|
|
# during the make scan step in next task |
|
|
|
# during the make scan step in next task |
|
|
@ -144,15 +109,11 @@ |
|
|
|
recursive: True |
|
|
|
recursive: True |
|
|
|
delete: True |
|
|
|
delete: True |
|
|
|
delegate_to: "{{ inventory_hostname }}" |
|
|
|
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 |
|
|
|
shell: make scan && make && make install LOCALE_DIR={{ pki_root_dir }}/locale |
|
|
|
args: |
|
|
|
args: |
|
|
|
chdir: "{{ pki_root_dir }}/src/openxpki-{{ pki_version }}/core/i18n" |
|
|
|
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: |
|
|
|
synchronize: |
|
|
@ -163,9 +124,17 @@ |
|
|
|
with_items: |
|
|
|
with_items: |
|
|
|
- cgi-bin |
|
|
|
- cgi-bin |
|
|
|
- htdocs |
|
|
|
- htdocs |
|
|
|
when: pki_install_mode != 'none' |
|
|
|
|
|
|
|
tags: pki |
|
|
|
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 |
|
|
|
- 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 |
|
|
|
command: sed -i -e 's|/openxpki/|{{ pki_web_alias }}|g' {{ pki_root_dir }}/web/htdocs/default.html |
|
|
|
changed_when: False |
|
|
|
changed_when: False |
|
|
@ -217,7 +186,7 @@ |
|
|
|
login_password: "{{ mysql_admin_pass }}" |
|
|
|
login_password: "{{ mysql_admin_pass }}" |
|
|
|
when: |
|
|
|
when: |
|
|
|
- pki_install_mode == 'install' |
|
|
|
- pki_install_mode == 'install' |
|
|
|
- pki_db.changed |
|
|
|
- db_created.changed |
|
|
|
tags: pki |
|
|
|
tags: pki |
|
|
|
|
|
|
|
|
|
|
|
- name: Copy additional sql scripts |
|
|
|
- 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/ |
|
|
|
copy: src=upgrade_to_v{{ item }}.sql dest={{ pki_root_dir }}/src/openxpki-config-{{ pki_config_version }}/contrib/sql/ |
|
|
|
loop: |
|
|
|
loop: |
|
|
|
- '3.4' |
|
|
|
- '3.4' |
|
|
|
|
|
|
|
- '3.8' |
|
|
|
tags: pki |
|
|
|
tags: pki |
|
|
|
|
|
|
|
|
|
|
|
- name: Apply db upgrades |
|
|
|
- name: Apply db upgrades |
|
|
@ -282,6 +252,7 @@ |
|
|
|
login_password: "{{ mysql_admin_pass }}" |
|
|
|
login_password: "{{ mysql_admin_pass }}" |
|
|
|
loop: |
|
|
|
loop: |
|
|
|
- '3.4' |
|
|
|
- '3.4' |
|
|
|
|
|
|
|
- '3.8' |
|
|
|
when: |
|
|
|
when: |
|
|
|
- pki_install_mode == 'upgrade' |
|
|
|
- pki_install_mode == 'upgrade' |
|
|
|
- pki_current_version is version(item, '<') |
|
|
|
- pki_current_version is version(item, '<') |
|
|
|