-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathlocalstack.yml
More file actions
58 lines (47 loc) · 1.48 KB
/
localstack.yml
File metadata and controls
58 lines (47 loc) · 1.48 KB
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
---
- ansible.builtin.import_tasks: docker.yml
- ansible.builtin.import_tasks: aws_cli.yml
- name: create localstack user
ansible.builtin.user:
name: '{{ localstack.user }}'
group: docker
- name: ensure dot dir exists
file:
path: '~{{ localstack.user }}/.aws'
state: directory
owner: '{{ localstack.user }}'
mode: '0700'
- name: place localstack aws credentials
template:
src: localstack_aws_credentials.j2
dest: '~{{ localstack.user }}/.aws/credentials'
owner: '{{ localstack.user }}'
mode: '0600'
- name: place localstack aws config
template:
src: localstack_aws_config.j2
dest: '~{{ localstack.user }}/.aws/config'
owner: '{{ localstack.user }}'
mode: '0600'
# so we can run localstack task stand-alone
- ansible.builtin.import_tasks: dataverse-fqdn.yml
- name: is hostname_external set
ansible.builtin.set_fact:
hostname_external: '{{ public_fqdn }}'
when: localstack.hostname_external is undefined
- name: place docker-compose.yml template
ansible.builtin.template:
src: localstack-compose.yml.j2
dest: '~{{ localstack.user }}/localstack-compose.yml'
- name: ensure DATA_DIR exists
ansible.builtin.file:
path: '{{ localstack.data_dir }}'
state: directory
owner: '{{ localstack.user }}'
mode: 0755
- name: start s3-test container
ansible.builtin.shell: 'docker compose -f localstack-compose.yml up -d'
become: true
become_user: '{{ localstack.user }}'
args:
chdir: '~{{ localstack.user }}'