This repository was archived by the owner on Oct 8, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmain.yml
More file actions
45 lines (42 loc) · 1.49 KB
/
main.yml
File metadata and controls
45 lines (42 loc) · 1.49 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
---
- name: Carry out composer commands.
when: deploy_operation == 'deploy'
block:
- name: Validate composer.json and composer.lock files.
community.general.composer:
command: "{{ composer.validate_command }}"
arguments: "{{ composer.validate_args }}"
no_dev: "{{ composer.no_dev }}"
working_dir: "{{ composer.working_dir }}"
apcu_autoloader: "{{ composer.apcu_autoloader }}"
when:
- composer.validate_command | length > 1
- name: Perform composer step.
community.general.composer:
command: "{{ composer.command }}"
arguments: "{{ composer.args | default(omit) }}"
no_dev: "{{ composer.no_dev }}"
working_dir: "{{ composer.working_dir }}"
apcu_autoloader: "{{ composer.apcu_autoloader }}"
when:
- composer.command | length > 1
- name: Generate additional templates.
ansible.builtin.template:
src: "{{ template.src }}"
dest: "{{ deploy_path }}/{{ template.dest }}"
with_items: "{{ composer.templates }}"
loop_control:
loop_var: template
when:
- composer.templates | length > 0
- name: Create additional symlinks.
ansible.builtin.file:
src: "{{ link.src }}"
dest: "{{ deploy_path }}/{{ link.dest }}"
state: link
force: "{{ link.force | default(false) }}"
with_items: "{{ composer.symlinks }}"
loop_control:
loop_var: link
when:
- composer.symlinks | length > 0