-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.yml
42 lines (35 loc) · 943 Bytes
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
---
- hosts: localhost
vars:
base_mount_point: "/BASE"
disk_marker_file: "/BASE/disk.marker"
tasks:
- name: Check if marker file exists
ansible.builtin.stat:
path: "{{ disk_marker_file }}"
register: marker
- block:
- name: Execute tasks in role 'qemu'
include_role:
name: qemu
tags: qemu
- name: Execute tasks in role 'base'
include_role:
name: base
tags: qemu
- name: Create marker file
ansible.builtin.file:
path: "{{ disk_marker_file }}"
state: touch
when: (marker.stat.exists | default(false)) == false
- hosts: qemuchroot
connection: community.general.chroot
# become_user: root
# become: yes
roles:
- role: packages
tags: qemu
# tasks:
# - name: Run a command inside the chroot
# shell: "echo test123 > /test.txt"
# tags: qemu