summaryrefslogtreecommitdiff
path: root/roles/vault/lxc.yml
blob: 03028043a9c59b2e44084d8bf663f2b6487c05e7 (plain)
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
---
- name: Install Vault to LXC
  hosts: local

  vars_files:
    - ../variables.yml

  tasks:

  - name: Creating container
    lxc_container:
      name: ansible-alpine3.11
      clone_name: "{{ vault_user }}"
      backing_store: dir
      state: stopped

  - name: Starting container
    lxc_container:
      name: "{{ vault_user }}"
      state: started

  - name: Waiting for container
    shell: until ping -c1 {{ vault_user }}.lxc; do :; done
    changed_when: false

  become: true
  become_user: root

- import_playbook: main.yml