23 lines
537 B
YAML
23 lines
537 B
YAML
- name: Deploy app
|
|
hosts: cloud
|
|
gather_facts: false
|
|
vars:
|
|
app: nextcloud
|
|
tasks:
|
|
- name: Wait for connection
|
|
ansible.builtin.wait_for_connection:
|
|
timeout: 300
|
|
- name: Get user
|
|
ansible.builtin.user:
|
|
name: debian
|
|
register: user
|
|
- name: Copy project
|
|
ansible.builtin.copy:
|
|
src: ./{{ app }}
|
|
dest: "{{ user.home }}"
|
|
mode: "0744"
|
|
- name: Re-deploy
|
|
ansible.builtin.command: bash all-in-one.sh
|
|
args:
|
|
chdir: "{{ user.home }}/{{ app }}"
|