library/roles/virtuoso: Manage the dba password.

dnet-openaire: Set the dba password.
This commit is contained in:
Andrea Dell'Amico 2015-06-30 14:39:58 +02:00
parent ebeb9064d7
commit 818cf8091c
2 changed files with 33 additions and 1 deletions

View File

@ -10,6 +10,11 @@ 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_isql: /usr/bin/isql-vt
#virtuoso_dba_pwd: set it in a vault file
virtuoso_defaults:
- { key: 'DBPATH', value: '"{{ virtuoso_db_dir }}"' }
@ -25,7 +30,12 @@ virtuoso_ini_opts:
- { section: 'TempDatabase', option: 'DatabaseFile', value: '{{ virtuoso_db_dir }}/virtuoso-temp.db' }
- { section: 'TempDatabase', option: 'TransactionFile', value: '{{ virtuoso_db_dir }}/virtuoso-temp.trx' }
- { section: 'HTTPServer', option: 'ServerRoot', value: '{{ virtuoso_http_server_root }}' }
- { section: 'Parameters', option: 'ServerPort', value: '{{ virtuoso_server_port }}' }
- { section: 'Parameters', option: 'DirsAllowed', value: '{{ virtuoso_dirsallowed }}' }
virtuoso_set_more_ini_opts: False
#virtuoso_more_ini_opts:
virtuoso_pkg_state: latest
virtuoso_pkg_list:
- virtuoso-opensource

View File

@ -16,6 +16,15 @@
notify: Restart virtuoso
tags: [ 'virtuoso', 'virtuoso_conf' ]
- name: Set up the virtuoso ini file with additional options if there are any
ini_file: dest=/etc/virtuoso-opensource-{{ virtuoso_version }}/virtuoso.ini section={{ item.section }} option={{ item.option }} value={{ item.value }} owner=root group=root mode=0444
with_items: virtuoso_more_ini_opts
when:
- virtuoso_set_more_ini_opts
- virtuoso_more_ini_opts is defined
notify: Restart virtuoso
tags: [ 'virtuoso', 'virtuoso_conf' ]
- name: Set the directory permissions for the virtuoso user
file: path={{ item }} state=directory recurse=yes owner={{ virtuoso_user }} group={{ virtuoso_user }}
with_items:
@ -23,3 +32,16 @@
- '{{ virtuoso_log_dir }}'
when: ( virtuoso_user != 'root' )
tags: [ 'virtuoso', 'virtuoso_conf' ]
- 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
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'
args:
creates:
'{{ virtuoso_db_dir }}/.dba_changed_password'
when: virtuoso_dba_pwd is defined
tags: [ 'virtuoso', 'virtuoso_conf' ]