separate playbooks
Infrastructure / Check and run Ansbile playbooks (pull_request) Failing after 6m14s Details

This commit is contained in:
Gleb Koval 2023-09-25 21:48:29 +01:00
parent edbd1cd9f9
commit 0a479039e2
Signed by: cyclane
GPG Key ID: 15E168A8B332382C
3 changed files with 58 additions and 53 deletions

View File

@ -0,0 +1,18 @@
- name: Initialise VM
hosts: cloud
gather_facts: false
tasks:
- name: Wait for connection
ansible.builtin.wait_for_connection:
timeout: 300
- name: Install system packages
ansible.builtin.apt:
package: qemu-guest-agent
state: latest
become: true
- name: Enable qemu-guest-agent
ansible.builtin.systemd:
name: qemu-guest-agent
state: started
enabled: true
become: true

View File

@ -1,53 +0,0 @@
- name: Setup Software
hosts: cloud
gather_facts: false
tasks:
- name: Wait for connection
ansible.builtin.wait_for_connection:
timeout: 300
- name: Install system packages
ansible.builtin.apt:
package: qemu-guest-agent
state: latest
become: true
- name: Install docker
block:
- name: Install dependencies
ansible.builtin.apt:
package:
- curl
- python3-apt
- gpg
state: latest
become: true
- name: Add key
ansible.builtin.apt_key:
url: https://download.docker.com/linux/debian/gpg
become: true
- name: Add repo
ansible.builtin.apt_repository:
update_cache: true
repo: deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian bookworm stable
become: true
- name: Install docker
ansible.builtin.apt:
pacakge:
- docker-ce
- docker-ce-cli
- containerd.io
- docker-buildx-plugin
- docker-compose-plugin
state: latest
become: true
- name: Enable docker
ansible.builtin.systemd:
name: docker
state: started
enabled: true
become: true
- name: Enable qemu-guest-agent
ansible.builtin.systemd:
name: qemu-guest-agent
state: started
enabled: true
become: true

View File

@ -0,0 +1,40 @@
- name: Install software
hosts: cloud
gather_facts: false
tasks:
- name: Wait for connection
ansible.builtin.wait_for_connection:
timeout: 300
- name: Install dependencies
ansible.builtin.apt:
package:
- curl
- python3-apt
- gpg
state: latest
become: true
- name: Add docker key
ansible.builtin.apt_key:
url: https://download.docker.com/linux/debian/gpg
become: true
- name: Add docker repo
ansible.builtin.apt_repository:
update_cache: true
repo: deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian bookworm stable
become: true
- name: Install docker
ansible.builtin.apt:
pacakge:
- docker-ce
- docker-ce-cli
- containerd.io
- docker-buildx-plugin
- docker-compose-plugin
state: latest
become: true
- name: Enable docker
ansible.builtin.systemd:
name: docker
state: started
enabled: true
become: true