Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
SequeI committed Nov 4, 2024
1 parent a1e1a3e commit 4894968
Showing 1 changed file with 17 additions and 19 deletions.
36 changes: 17 additions & 19 deletions molecule/user_provided/prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,31 @@
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
- mariadb-server
- 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
Expand All @@ -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
Expand All @@ -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 <<EOF
ALTER USER 'root'@'localhost' IDENTIFIED BY 'rootpassword';
Expand Down

0 comments on commit 4894968

Please sign in to comment.