|
|
@ -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,64 +52,79 @@ |
|
|
|
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 }}" |
|
|
|
- name: Install perl module without tests |
|
|
|
locallib: "{{ pki_root_dir }}" |
|
|
|
cpanm: |
|
|
|
with_items: |
|
|
|
name: "{{ item }}" |
|
|
|
- Config::Std |
|
|
|
locallib: "{{ pki_root_dir }}" |
|
|
|
- Fatal |
|
|
|
notest: True |
|
|
|
tags: pki |
|
|
|
with_items: |
|
|
|
|
|
|
|
- Git::PurePerl |
|
|
|
- name: Install perl module without tests |
|
|
|
- Connector # This module tries to fetch web content without checking proxy from env |
|
|
|
cpanm: |
|
|
|
- Net::Server # 2 tests are failing on el8 t/SSL_test.t and t/SSLEAY_test.t |
|
|
|
name: "{{ item }}" |
|
|
|
|
|
|
|
locallib: "{{ pki_root_dir }}" |
|
|
|
- name: Install OpenXPKI dependencies |
|
|
|
notest: True |
|
|
|
cpanm: |
|
|
|
with_items: |
|
|
|
locallib: "{{ pki_root_dir }}" |
|
|
|
- Git::PurePerl |
|
|
|
installdeps: True |
|
|
|
- Connector # This module tries to fetch web content without checking proxy from env |
|
|
|
from_path: "{{ pki_root_dir }}/src/openxpki-{{ pki_version }}/core/server" |
|
|
|
tags: pki |
|
|
|
environment: |
|
|
|
|
|
|
|
PERL5LIB: "{{ pki_root_dir }}/lib/perl5" |
|
|
|
- name: Install OpenXPKI dependencies |
|
|
|
PATH: "{{ pki_root_dir }}/bin:{{ ansible_env.PATH }}" |
|
|
|
cpanm: |
|
|
|
|
|
|
|
locallib: "{{ pki_root_dir }}" |
|
|
|
- name: Install additional perl modules |
|
|
|
installdeps: True |
|
|
|
cpanm: |
|
|
|
from_path: "{{ pki_root_dir }}/src/openxpki-{{ pki_version }}/core/server" |
|
|
|
name: "{{ item }}" |
|
|
|
environment: |
|
|
|
locallib: "{{ pki_root_dir }}" |
|
|
|
PERL5LIB: "{{ pki_root_dir }}/lib/perl5" |
|
|
|
with_items: |
|
|
|
PATH: "{{ pki_root_dir }}/bin:{{ ansible_env.PATH }}" |
|
|
|
- Devel::CheckLib # Needed to build BDB::mysql >= 4.047 |
|
|
|
tags: pki |
|
|
|
- DBD::mysql |
|
|
|
|
|
|
|
- Log::Log4perl::Appender::Screen # Log::Log4perl::Appender::Journald is broken on systemd > 209 |
|
|
|
- name: Build OpenXPKI |
|
|
|
- Data::Dump # Needed for the external ldap auth script |
|
|
|
cpanm: |
|
|
|
- String::Escape # Needed for the external ldap auth script |
|
|
|
locallib: "{{ pki_root_dir }}" |
|
|
|
- TINITA/YAML-1.30.tar.gz |
|
|
|
from_path: "{{ pki_root_dir }}/src/openxpki-{{ pki_version }}/core/server" |
|
|
|
|
|
|
|
notest: True |
|
|
|
- name: Build OpenXPKI |
|
|
|
when: pki_install_mode != 'none' |
|
|
|
cpanm: |
|
|
|
environment: |
|
|
|
locallib: "{{ pki_root_dir }}" |
|
|
|
PERL5LIB: "{{ pki_root_dir }}/lib/perl5" |
|
|
|
from_path: "{{ pki_root_dir }}/src/openxpki-{{ pki_version }}/core/server" |
|
|
|
PATH: "{{ pki_root_dir }}/bin:{{ ansible_env.PATH }}" |
|
|
|
notest: True |
|
|
|
tags: pki |
|
|
|
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" |
|
|
|
|
|
|
|
notify: restart openxpki |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# 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 |
|
|
|
|
|
|
|
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 }}" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- 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" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Install the web UI |
|
|
|
|
|
|
|
synchronize: |
|
|
|
|
|
|
|
src: "{{ pki_root_dir }}/src/openxpki-{{ pki_version }}/core/server/{{ item }}" |
|
|
|
|
|
|
|
dest: "{{ pki_root_dir }}/web/" |
|
|
|
|
|
|
|
recursive: True |
|
|
|
|
|
|
|
delegate_to: "{{ inventory_hostname }}" |
|
|
|
|
|
|
|
with_items: |
|
|
|
|
|
|
|
- cgi-bin |
|
|
|
|
|
|
|
- htdocs |
|
|
|
|
|
|
|
|
|
|
|
- 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 |
|
|
|
|
|
|
|
- Data::Dump # Needed for the external ldap auth script |
|
|
|
|
|
|
|
- String::Escape # Needed for the external ldap auth script |
|
|
|
|
|
|
|
tags: pki |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- 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 |
|
|
|
tags: pki |
|
|
|
|
|
|
|
|
|
|
|
- name: Install OpenXPKI CGI::Session driver |
|
|
|
- name: Install OpenXPKI CGI::Session driver |
|
|
@ -135,36 +134,6 @@ |
|
|
|
remote_src: True |
|
|
|
remote_src: True |
|
|
|
tags: pki |
|
|
|
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 |
|
|
|
|
|
|
|
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 |
|
|
|
|
|
|
|
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 |
|
|
|
|
|
|
|
synchronize: |
|
|
|
|
|
|
|
src: "{{ pki_root_dir }}/src/openxpki-{{ pki_version }}/core/server/{{ item }}" |
|
|
|
|
|
|
|
dest: "{{ pki_root_dir }}/web/" |
|
|
|
|
|
|
|
recursive: True |
|
|
|
|
|
|
|
delegate_to: "{{ inventory_hostname }}" |
|
|
|
|
|
|
|
with_items: |
|
|
|
|
|
|
|
- cgi-bin |
|
|
|
|
|
|
|
- htdocs |
|
|
|
|
|
|
|
when: pki_install_mode != 'none' |
|
|
|
|
|
|
|
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 |
|
|
@ -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, '<') |
|
|
|