diff options
Diffstat (limited to 'provision.yaml')
-rw-r--r-- | provision.yaml | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/provision.yaml b/provision.yaml new file mode 100644 index 0000000..d23bbc9 --- /dev/null +++ b/provision.yaml @@ -0,0 +1,31 @@ +--- +- hosts: all + gather_facts: no + pre_tasks: + - name: Install Python 2 for Ansible fact gathering + raw: test -e /usr/bin/python || (apt -y update && apt install -y python-minimal) + +- hosts: all + tasks: + - name: Update Ubuntu server + apt: + update_cache: yes + upgrade: dist + - name: Install docker-compose + apt: + name: docker-compose + state: latest + - name: Create /home/vps/ base directory + file: + path: /home/vps/ + state: directory + - name: Copy file + copy: src={{ item.src }} dest={{ item.dest }} + with_items: + - { src: './scripts/box/bash-profile.sh', dest: '/etc/profile.d/bash-profile.sh' } + - { src: './docker-compose.yaml', dest: '/home/vps/docker-compose.yaml' } + - name: Start docker-compose + docker_service: + project_src: /home/vps/ + pull: yes + state: present |