diff --git a/inventory/all b/inventory/all deleted file mode 100644 index e69de29..0000000 diff --git a/hosts b/inventory/group_vars/db similarity index 100% rename from hosts rename to inventory/group_vars/db diff --git a/inventory/group_vars/db_vault b/inventory/group_vars/db_vault new file mode 100644 index 0000000..6504299 --- /dev/null +++ b/inventory/group_vars/db_vault @@ -0,0 +1,8 @@ +$ANSIBLE_VAULT;1.1;AES256 +34626434323630303038366133623235343836353338666532653864656533623937643239313261 +3036333938613861313833303537343637386135643939640a636638363934326133386538306163 +63616464303165396338366465336335613761316261666535633730653433333465303761323837 +6261323137663035390a616438393138663039643233306233653361663435623239323639623335 +65383038306462363263623162343363613633633432333364363236633065633437623339396239 +35633137613933323635306234633262306536393536316464326431646361366438346661333234 +383930316166353338313935353133316666 diff --git a/inventory/hosts b/inventory/hosts new file mode 100644 index 0000000..6710a9f --- /dev/null +++ b/inventory/hosts @@ -0,0 +1,7 @@ +vps ansible_connection=ssh ansible_host=51.222.107.37 ansible_port=2424 ansible_user=valentin + +[db] +vps + +[db_vault:children] +db \ No newline at end of file diff --git a/test.yml b/playbook.yml similarity index 70% rename from test.yml rename to playbook.yml index fa17688..a84028b 100644 --- a/test.yml +++ b/playbook.yml @@ -1,5 +1,5 @@ --- -- hosts: localhost +- hosts: db remote_user: root roles: - server diff --git a/server/tasks/main.yml b/server/tasks/main.yml index c33f790..5e9e87c 100644 --- a/server/tasks/main.yml +++ b/server/tasks/main.yml @@ -1,2 +1,22 @@ --- # tasks file for server + +- name: git archive local + local_action: + module: git + repo: "https://{{ git_username | urlencode }}:{{ git_password | urlencode }}@git.valczeryba.ovh/v4l3n71n/covas-liquibase.git" + dest: "/home/valentin/src/" + archive: "/tmp/covas-liquibase.tar.gz" + force: yes + update: yes + run_once: True + +- name: Create directory + file: + path: "/home/valentin/covas-liquibase" + state: directory + +- name: Extract repo isr + unarchive: + src: "/tmp/covas-liquibase.tar.gz" + dest: "/home/valentin/covas-liquibase" \ No newline at end of file