Skip to content

Commit

Permalink
setup - minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
superstes committed Apr 10, 2021
1 parent 8fc3ded commit 9324337
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 7 deletions.
6 changes: 6 additions & 0 deletions setup/roles/core/handlers/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---

- name: 'start_core_service'
service:
name: 'ga_core.service'
state: started
10 changes: 3 additions & 7 deletions setup/roles/core/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,11 @@
path: "{{ ga_core_path }}/core/secret/random.key"
state: present
create: yes
no_log: true
when: not random_key_file.stat.exists

- name: GA | Core | Setting privileges for secret files
file:
path: "{{ ga_core_path }}/core/secret/random.key"
mode: 0440
owner: "{{ ga_core_service_user }}"
group: "{{ ga_service_group }}"
no_log: true
when: not random_key_file.stat.exists

- name: GA | Core | Adding core config file
template:
Expand Down Expand Up @@ -104,7 +100,7 @@
service:
name: 'ga_core.service'
enabled: yes
state: started
notify: 'start_core_service'

- name: GA | Configure device support
import_role:
Expand Down
7 changes: 7 additions & 0 deletions setup/roles/ufw/tasks/ssh.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@
register: configured_ssh_port
ignore_errors: true

- name: GA | UFW | SSH | Displaying info
debug:
msg: "INFO: The ssh port cannot be pulled from config if it was not customized. In that case you can ignore this error!"
when:
- configured_ssh_port.failed is defined
- configured_ssh_port.failed

- name: GA | UFW | SSH | Setting configured ssh port
set_fact:
tmp_ssh_port: "{{ configured_ssh_port.stdout_lines[0].split(' ', 1)[1] }}"
Expand Down
7 changes: 7 additions & 0 deletions setup/roles/web/tasks/init_db.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@
when: init_script.changed
ignore_errors: true # if executed more than once -> it will fail

- name: GA | Web | Init | Displaying info
debug:
msg: "INFO: The database initialization might fail if it was already run. In that case you can ignore this error!"
when:
- init_script.failed is defined
- init_script.failed

- name: GA | Web | Init | Creating ga groups
shell: "source {{ ga_web_path_venv }}/bin/activate &&
{{ ga_web_path_venv }}/bin/python3 /tmp/create_group.py {{ group | quote }}"
Expand Down

0 comments on commit 9324337

Please sign in to comment.