summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--roles/vault/lxc.yml29
1 files changed, 29 insertions, 0 deletions
diff --git a/roles/vault/lxc.yml b/roles/vault/lxc.yml
new file mode 100644
index 0000000..0302804
--- /dev/null
+++ b/roles/vault/lxc.yml
@@ -0,0 +1,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