diff --git a/inventory/hosts b/inventory/hosts index 5c5d87d..ade87f2 100644 --- a/inventory/hosts +++ b/inventory/hosts @@ -1,11 +1,14 @@ -vps ansible_connection=ssh ansible_host=51.222.107.37 ansible_port=2424 ansible_user=valentin +vps-host ansible_connection=ssh ansible_host=51.222.107.37 ansible_port=2424 ansible_user=valentin valentin-nas ansible_connection=ssh ansible_host=151.80.37.38 ansible_port=2424 ansible_user=valentin drone-host ansible_connection=ssh ansible_host=151.80.37.38 ansible_port=2424 ansible_user=valentin localhost ansible_host=127.0.0.1 -[db] +[vps] +vps-host + +[db:children] +local vps -localhost [db_vault:children] db diff --git a/playbook.yml b/playbook.yml index ab57557..c598e5a 100644 --- a/playbook.yml +++ b/playbook.yml @@ -1,5 +1,5 @@ --- -- hosts: registry db drone +- hosts: registry vps remote_user: valentin roles: - server diff --git a/server/tasks/remove.yml b/server/tasks/remove.yml index 9c6e9f3..e8a6b83 100644 --- a/server/tasks/remove.yml +++ b/server/tasks/remove.yml @@ -15,4 +15,8 @@ - name: Remove project file: path: "{{ project_src }}" - state: absent \ No newline at end of file + state: absent + vars: + ansible_become: yes + ansible_become_method: sudo + ansible_become_password: "{{ sudo_password }}" \ No newline at end of file