diff --git a/molecule/user_provided/prepare.yml b/molecule/user_provided/prepare.yml index a5be5615..c920eb84 100644 --- a/molecule/user_provided/prepare.yml +++ b/molecule/user_provided/prepare.yml @@ -6,13 +6,13 @@ vars_files: - vars/vars.yml tasks: - - name: stopping service + - name: Stopping service ansible.builtin.service: name: mariadb state: stopped ignore_errors: yes - - name: uninstalling + - name: Uninstalling packages ansible.builtin.yum: name: - mariadb @@ -20,14 +20,17 @@ - redis state: absent - - name: deletings mysql + - name: Deleting leftover mySQL file: path: /var/lib/mysql state: absent - - name: Install Redis + - name: Installing packages ansible.builtin.yum: - name: redis + name: + - redis + - mariadb + - mariadb-server state: latest - name: Enable and start Redis @@ -40,18 +43,10 @@ shell: | echo "CONFIG SET requirepass "password"" | redis-cli - - name: Install mariadb - ansible.builtin.yum: - name: - - mariadb - - mariadb-server - state: latest - - name: Uncommenting bind-address shell: | sed -i 's/#bind_address=0.0.0.0/bind_address=0.0.0.0/g' /etc/my.cnf.d/mariadb-server.cnf - - name: Enable and start MariaDB ansible.builtin.service: name: mariadb @@ -61,15 +56,18 @@ - name: Create Trillian Database shell: echo "CREATE DATABASE trillian;" | mysql - - name: Download schema - shell: | - curl -sSL https://raw.githubusercontent.com/securesign/trillian/refs/heads/main/storage/mysql/schema/storage.sql > schema.sql + - name: Download Trillian schema + ansible.builtin.get_url: + url: https://raw.githubusercontent.com/securesign/trillian/refs/heads/main/storage/mysql/schema/storage.sql + dest: /tmp/schema.sql + retries: 5 + delay: 5 - - name: Import schema + - name: Import Trillian schema shell: | - mysql -u root trillian < schema.sql + mysql -u root trillian < /tmp/schema.sql - - name: Prepare MariaDB installation + - name: Prepare MariaDB configuration shell: | mysql <