Skip to content

Commit

Permalink
fixed db creation and task order
Browse files Browse the repository at this point in the history
  • Loading branch information
c-goes committed Nov 6, 2019
1 parent 2a2230c commit 6f50e5a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
8 changes: 5 additions & 3 deletions gameserver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@
become: yes

- hosts: web
roles:
- mariadb
#- scorebot_deps_2019
tasks:

- user:
Expand Down Expand Up @@ -116,3 +113,8 @@
group: "vagrant"
recurse: yes
become: yes

- hosts: web
roles:
- mariadb
#- scorebot_deps_2019
9 changes: 4 additions & 5 deletions roles/mariadb/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
become: True


- name: Adding deploy DB user and allow access to news_* databases
- name: Adding deploy DB user and allow access to ctf_* databases
mysql_user:
name: ctf
password: "{{ mysql_ctf_password }}"
Expand All @@ -153,7 +153,7 @@
copy:
src: "{{ role_path }}/files/ctf_dump.sql"
dest: /tmp
when: db_created.changed and dump_file.exists
when: db_created.changed and dump_file.stat.exists
become: True


Expand All @@ -164,7 +164,7 @@
target: /tmp/ctf_dump.sql
login_user: root
login_password: "{{ mysql_root_password }}"
when: db_created.changed and dump_file.exists
when: db_created.changed and dump_file.stat.exists
become: True


Expand All @@ -180,8 +180,7 @@
chdir: /vagrant/ctfdbapi/
environment:
PYTHONPATH: "/vagrant/ctfdbapi/"
#when: db_created.changed and not dump_file.exists
#when: not dump_file.exists
when: db_created.changed and not dump_file.stat.exists
become: yes


Expand Down

0 comments on commit 6f50e5a

Please sign in to comment.