kovalhome/infra/cloud/0003_nextcloud_playbook cop...

23 lines
537 B
YAML
Raw Normal View History

2023-09-25 23:40:09 +00:00
- name: Deploy app
hosts: cloud
gather_facts: false
vars:
2023-09-26 02:13:11 +00:00
app: nextcloud
2023-09-25 23:40:09 +00:00
tasks:
- name: Wait for connection
ansible.builtin.wait_for_connection:
timeout: 300
2023-09-26 00:05:26 +00:00
- name: Get user
ansible.builtin.user:
name: debian
register: user
2023-09-25 23:40:09 +00:00
- name: Copy project
ansible.builtin.copy:
2023-09-26 02:13:11 +00:00
src: ./{{ app }}
2023-09-26 00:05:26 +00:00
dest: "{{ user.home }}"
2023-09-26 00:20:36 +00:00
mode: "0744"
2023-09-26 02:13:11 +00:00
- name: Re-deploy
ansible.builtin.command: bash all-in-one.sh
2023-09-26 00:49:40 +00:00
args:
2023-09-26 02:13:11 +00:00
chdir: "{{ user.home }}/{{ app }}"