Skip to content
This repository has been archived by the owner on Jun 7, 2023. It is now read-only.

Commit

Permalink
make the use of data_dir conditional based on inventory
Browse files Browse the repository at this point in the history
  • Loading branch information
tomdaley92 committed Aug 27, 2022
1 parent f01d58b commit 03c0bed
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .ansible/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
- include_role:
name: docker
tasks_from: stack_teardown
when: clean_install | default(false)
when: version == "dev"

- name: 'Wipe all persistent data'
file:
state: absent
path: '{{ app_dir }}'
become: yes
when: clean_install | default(false)
when: version == "dev"

- include_role:
name: application
Expand All @@ -24,6 +24,7 @@
- include_role:
name: application
tasks_from: make_data_dir
when: version == "dev"

- name: Ensure {{ config_dir }}/certs exists
file:
Expand All @@ -34,11 +35,13 @@
file:
state: directory
path: '{{ data_dir }}/slapd'
when: version == "dev"

- name: Ensure {{ data_dir }}/ldap exists
file:
state: directory
path: '{{ data_dir }}/ldap'
when: version == "dev"

- name: 'Loosen config dir permissions'
file:
Expand All @@ -51,6 +54,7 @@
state: directory
path: '{{ data_dir }}'
mode: 'u=rwx,g=rwx,o=rwx'
when: version == "dev"

- name: 'Copy dhparam.pem to {{ config_dir }}/certs/custom_dhparam.pem'
copy:
Expand Down

0 comments on commit 03c0bed

Please sign in to comment.