From 281c52363a058c1146c2a004da7f4bde0fa32844 Mon Sep 17 00:00:00 2001 From: Brian Lee Date: Fri, 20 Oct 2023 10:30:25 -0700 Subject: [PATCH] Bump dojo version and some minor cleanup. --- defaults/main.yml | 2 +- tasks/main.yml | 2 +- tasks/podman.yml | 7 +++---- tasks/setup.yml | 12 ++++++------ 4 files changed, 11 insertions(+), 12 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index 0adaba3..7c1f5a3 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,5 +1,5 @@ --- -samourai_dojo_version: "1.20.0" +samourai_dojo_version: "1.21.0" samourai_dojo_onion_service: "{{ lookup('ansible.builtin.env', 'SAMOURAI_DOJO_ONION') | default('_') }}" samourai_dojo_onion_port: 80 samourai_dojo_onion_path: data-tor diff --git a/tasks/main.yml b/tasks/main.yml index e74c278..14ca482 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -5,7 +5,7 @@ - ansible_user_id != 'root' fail_msg: "Podman containers are rootless, so please do not run this role as root." -- name: Dojo | Assert all secrets have been defined. +- name: Assert all secrets have been defined. ansible.builtin.assert: that: - item is defined diff --git a/tasks/podman.yml b/tasks/podman.yml index 972ff19..76b47a9 100644 --- a/tasks/podman.yml +++ b/tasks/podman.yml @@ -1,6 +1,6 @@ --- # https://code.samourai.io/dojo/samourai-dojo/-/blob/develop/docker/my-dojo/docker-compose.yaml -- name: Dojo | Build image +- name: Build image register: podman_image_output containers.podman.podman_image: name: samourai-dojo @@ -10,21 +10,20 @@ pull: false state: build build: -# format: oci file: ~/src/samourai-dojo/docker/my-dojo/node/Dockerfile extra_args: "--build-arg TOR_LINUX_GID=1107" - ansible.builtin.debug: var: podman_image_output -- name: Dojo | Create volumes +- name: Create volumes containers.podman.podman_volume: state: present name: "{{ samourai_dojo_onion_path }}" recreate: no when: not samourai_dojo_onion_path.startswith('/') -- name: Dojo | Create container +- name: Create container register: podman_container_output containers.podman.podman_container: debug: no diff --git a/tasks/setup.yml b/tasks/setup.yml index e707b50..808d97f 100644 --- a/tasks/setup.yml +++ b/tasks/setup.yml @@ -1,5 +1,5 @@ --- -- name: Dojo | Clone repository +- name: Clone repository ansible.builtin.git: repo: 'https://code.samourai.io/dojo/samourai-dojo.git' dest: ~/src/samourai-dojo @@ -8,7 +8,7 @@ tags: upgrade # install/install-scripts.sh -- name: Dojo | Check whether the database has been initialized +- name: Check whether the database has been initialized community.mysql.mysql_info: filter: - databases @@ -17,7 +17,7 @@ login_password: "{{ samourai_dojo_config.MYSQL_PASSWORD }}" register: databases -- name: Dojo | Initialize database +- name: Initialize database community.mysql.mysql_db: name: samourai state: import @@ -26,20 +26,20 @@ login_password: "{{ samourai_dojo_config.MYSQL_PASSWORD }}" when: databases.databases.samourai.size == 0 -- name: Dojo | Initialize the maintenace tool +- name: Initialize the maintenace tool ansible.builtin.copy: remote_src: yes src: "~/src/samourai-dojo/static/admin/conf/index-{{ samourai_dojo_config.COMMON_BTC_NETWORK }}.js" dest: ~/src/samourai-dojo/static/admin/conf/index.js - block: - - name: Dojo | Ensure onoion services directory exists + - name: Ensure the onion services directory exists ansible.builtin.file: path: "{{ samourai_dojo_onion_path }}" state: directory mode: '0755' - - name: Dojo | Write the hostname to a file in the samourai_dojo_onion_path + - name: Write the hostname to a file in the samourai_dojo_onion_path ansible.builtin.lineinfile: path: "{{ samourai_dojo_onion_path }}/hostname" line: "{{ samourai_dojo_onion_service }}"