Fix the virtuoso task that changes the default password.

This commit is contained in:
Andrea Dell'Amico 2018-12-14 16:46:09 +01:00
parent 9e663e07c9
commit 5eac7a8c1f
2 changed files with 5 additions and 4 deletions

View File

@ -8,14 +8,15 @@ virtuoso_version: 7
virtuoso_user: virtuoso
virtuoso_base_dir: '/var/lib/virtuoso-opensource-{{ virtuoso_version }}'
virtuoso_db_dir: '{{ virtuoso_base_dir }}/db'
virtuoso_error_log: '{{ virtuoso_db_dir }}/virtuoso.log'
virtuoso_dumps_dir: '{{ virtuoso_base_dir }}/dumps'
virtuoso_log_dir: '/var/log/virtuoso-opensource-{{ virtuoso_version }}'
virtuoso_error_log: '{{ virtuoso_log_dir }}/virtuoso.log'
virtuoso_server_port: 1111
virtuoso_ssl_server_port: 2111
virtuoso_http_server: 8890
virtuoso_http_server_root: '/var/lib/virtuoso-opensource-{{ virtuoso_version }}/vsp'
virtuoso_vad_install_dir: '/usr/share/virtuoso-opensource-{{ virtuoso_version }}/vad'
virtuoso_dirsallowed: '., {{ virtuoso_vad_install_dir }}/, {{ virtuoso_log_dir }}/'
virtuoso_dirsallowed: '., {{ virtuoso_vad_install_dir }}/, {{ virtuoso_log_dir }}/, {{ virtuoso_dumps_dir }}/'
virtuoso_isql: /usr/bin/isql-vt
#virtuoso_dba_pwd: set it in a vault file

View File

@ -1,11 +1,11 @@
---
- name: Create the isql script to change the dba default password
copy: content="set password dba {{ virtuoso_dba_pwd }};\n" dest={{ virtuoso_db_dir }}/.isql_change_dba_pwd owner={{ virtuoso_user }} group={{ virtuoso_user }} mode=0400
copy: content="set password dba {{ virtuoso_dba_pwd }};\n" dest={{ virtuoso_db_dir }}/.isql_change_dba.sql owner={{ virtuoso_user }} group={{ virtuoso_user }} mode=0400
when: virtuoso_dba_pwd is defined
tags: [ 'virtuoso', 'virtuoso_conf' ]
- name: Change the default dba password
shell: '{{ virtuoso_isql }} -H localhost -S {{ virtuoso_server_port }} -U dba -P dba < {{ virtuoso_db_dir }}/.isql_change_dba_pwd ; touch {{ virtuoso_db_dir }}/.dba_changed_password'
shell: '{{ virtuoso_isql }} localhost:{{ virtuoso_server_port }} dba dba {{ virtuoso_db_dir }}/.isql_change_dba.sql -i arg1 && touch {{ virtuoso_db_dir }}/.dba_changed_password'
args:
creates:
'{{ virtuoso_db_dir }}/.dba_changed_password'