From 197157b83014b82847c1fcc68ac202fb50e57ff3 Mon Sep 17 00:00:00 2001 From: Ethan Paul Date: Tue, 9 Nov 2021 00:03:05 -0500 Subject: [PATCH] Update state directory to mabe not break itself on every reboot --- inventory.yaml | 2 +- tasks/meta/bootstrap-remote-env.yaml | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/inventory.yaml b/inventory.yaml index b50e010..6d5c6ba 100644 --- a/inventory.yaml +++ b/inventory.yaml @@ -1,7 +1,7 @@ --- all: vars: - skylab_state_dir: /var/run/skylab + skylab_state_dir: /var/lib/skylab skylab_ansible_venv: "{{ skylab_state_dir }}/ansible-runtime" skylab_pip_version: 19.3.1 ansible_user: ansible diff --git a/tasks/meta/bootstrap-remote-env.yaml b/tasks/meta/bootstrap-remote-env.yaml index 95c812f..9918b1d 100644 --- a/tasks/meta/bootstrap-remote-env.yaml +++ b/tasks/meta/bootstrap-remote-env.yaml @@ -9,6 +9,12 @@ - python3-policycoreutils - python3-firewall +- name: Remove legacy state directory + become: true + ansible.builtin.file: + path: /var/run/skylab + state: absent + - name: Create state directory become: true ansible.builtin.file: