Skip to content

Commit 6f66b79

Browse files
committed
Fix issues
1 parent 722d450 commit 6f66b79

File tree

3 files changed

+19
-18
lines changed

3 files changed

+19
-18
lines changed

defaults/main.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@
22

33
php_composer_install_path: /usr/local/bin/composer.phar
44

5-
php_composer_version: ~
6-
7-
php_composer_wrapper_enabled: yes
5+
php_composer_version:
6+
php_composer_wrapper_enabled: true
87
php_composer_wrapper_path: /usr/local/bin/composer
98
php_composer_wrapper_ini_directives:
10-
allow_url_fopen: yes
9+
allow_url_fopen: true
1110
disable_functions: ""
1211
memory_limit: -1

meta/main.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,16 @@
33
galaxy_info:
44
author: "Jasper N. Brouwer, Ramon de la Fuente"
55
role_name: php_composer
6+
namespace: "f500"
67
description: Install Composer, the dependency manager for PHP
78
company: Future500
89
license: LGPL-3.0
910
min_ansible_version: "1.4"
1011
platforms:
11-
- name: Debian
12-
versions:
13-
- bullseye
14-
- bookworm
12+
- name: Debian
13+
versions:
14+
- bullseye
15+
- bookworm
1516
galaxy_tags:
1617
- web
1718
- system

tasks/main.yml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,43 @@
11
---
2-
32
- name: Check if Composer is installed
4-
stat:
3+
ansible.builtin.stat:
54
path: "{{ php_composer_install_path }}"
65
register: php_composer_binary
76

87
- name: Install packages needed to install Composer
9-
apt:
8+
ansible.builtin.apt:
109
name: wget
1110
state: present
1211
when: not php_composer_binary.stat.exists
1312

1413
- name: Create the install script
15-
template:
14+
ansible.builtin.template:
1615
src: composer-install.sh.j2
1716
dest: /tmp/composer-install.sh
18-
mode: 0755
17+
mode: "0755"
1918
when: not php_composer_binary.stat.exists
2019

2120
- name: Install Composer
22-
command: ./composer-install.sh
21+
ansible.builtin.command: ./composer-install.sh
2322
args:
2423
chdir: /tmp
2524
when: not php_composer_binary.stat.exists
25+
changed_when: false
2626

2727
- name: Remove the install script
28-
file:
28+
ansible.builtin.file:
2929
path: /tmp/composer-install.sh
3030
state: absent
3131
when: not php_composer_binary.stat.exists
3232

3333
- name: Move Composer to the install path
34-
command: mv /tmp/composer.phar "{{ php_composer_install_path }}"
34+
ansible.builtin.command: mv /tmp/composer.phar "{{ php_composer_install_path }}"
3535
when: not php_composer_binary.stat.exists
36+
changed_when: false
3637

3738
- name: Enable the wrapper
38-
template:
39+
ansible.builtin.template:
3940
src: composer.j2
4041
dest: "{{ php_composer_wrapper_path }}"
41-
mode: 0755
42+
mode: "0755"
4243
when: php_composer_wrapper_enabled | bool

0 commit comments

Comments
 (0)