Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
php
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
uib-ub
Drift
roller-ansible
php
Commits
5e1c0d69
Commit
5e1c0d69
authored
6 months ago
by
Oyvind.Gjesdal
Browse files
Options
Downloads
Patches
Plain Diff
add composer installed by download
parent
058e6724
No related branches found
No related tags found
1 merge request
!7
add composer installed by download
Pipeline
#262793
failed
6 months ago
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
README.md
+2
-0
2 additions, 0 deletions
README.md
defaults/main.yml
+3
-0
3 additions, 0 deletions
defaults/main.yml
files/composer.sh
+23
-0
23 additions, 0 deletions
files/composer.sh
tasks/composer.yml
+29
-0
29 additions, 0 deletions
tasks/composer.yml
tasks/main.yml
+2
-8
2 additions, 8 deletions
tasks/main.yml
with
59 additions
and
8 deletions
README.md
+
2
−
0
View file @
5e1c0d69
...
...
@@ -26,9 +26,11 @@ Avhengig av at apache er installert. Rollen legger til en apache konfigurasjon f
Role Variables
--------------
# different php_version for remi vs system packages, use 8.0 etc when installing from application stream
php_version: "80" # 54/55/56/70/71/72/73/74/80/81/82, se tilgjengelige alternativ under remi repo.
php_packages_extras: ["php-pdo","php-xml"] # sett pakker som skal installeres, pakker kan browses fra https://rpms.remirepo.net/enterprise/7/
php_composer: false # false/true, installerer pakke fra remi.
php_composer_update: true # force update of composer from getcomposer, doesn't update by default
php_writable_paths: #setter sefcontext for at php skal få lov til å skrive i paths. gir også write permission til user.
-
"/var/www/html/cache"
-
"/var/www/html/upload"
...
...
This diff is collapsed.
Click to expand it.
defaults/main.yml
+
3
−
0
View file @
5e1c0d69
...
...
@@ -14,6 +14,9 @@ php_selinux: true
# - name: "max_input_vars"
# value: "5000"
# don't force update of php_composer by default
php_composer_update
:
false
# since no php81-php-fpm-httpd package found, create php-fpm.conf instead.
php_fpm_config
:
|
#
...
...
This diff is collapsed.
Click to expand it.
files/composer.sh
0 → 100644
+
23
−
0
View file @
5e1c0d69
#!/bin/sh
EXPECTED_CHECKSUM
=
"
$(
php
-r
'copy("https://composer.github.io/installer.sig", "php://stdout");'
)
"
php
-r
"copy('https://getcomposer.org/installer', 'composer-setup.php');"
ACTUAL_CHECKSUM
=
"
$(
php
-r
"echo hash_file('sha384', 'composer-setup.php');"
)
"
if
[
"
$EXPECTED_CHECKSUM
"
!=
"
$ACTUAL_CHECKSUM
"
]
then
>
&2
echo
'ERROR: Invalid installer checksum'
rm
composer-setup.php
exit
1
fi
php composer-setup.php
--quiet
RESULT
=
$?
if
[
$RESULT
-eq
0
]
;
then
mv
bin/composer.phar /local/usr/bin/composer
fi
rm
composer-setup.php
exit
$RESULT
This diff is collapsed.
Click to expand it.
tasks/composer.yml
0 → 100644
+
29
−
0
View file @
5e1c0d69
-
name
:
"
install
composer
from
package
(centos
7)"
block
:
-
name
:
"
install
epel"
package
:
name
:
"
epel-release"
-
name
:
"
install
composer
from
package"
package
:
name
:
"
composer"
when
:
"
ansible_distribution_major_version
==
'7'"
-
name
:
"
register
if
binary
exists"
stat
:
path
:
"
/usr/local/bin/composer"
register
:
composer_binary
-
name
:
"
install
composer
using
getcomposer
instructions"
when
:
"
ansible_distribution_major_version
!=
7
and
((
not
composer_binary.stat.exists
|
bool
)
or
php_composer_update
|
bool)"
block
:
-
name
:
"
copy
install
file
to
disk"
copy
:
src
:
"
files/composer.sh"
dest
:
"
/tmp/composer.sh"
-
name
:
"
run
shell
script
for
installing
composer"
shell
:
"
sh
/tmp/composer.sh"
-
name
:
"
remove
installation
file"
file
:
path
:
"
/tmp/composer.sh"
This diff is collapsed.
Click to expand it.
tasks/main.yml
+
2
−
8
View file @
5e1c0d69
...
...
@@ -49,14 +49,8 @@
when
:
"
fpm_install.changed"
become
:
true
-
name
:
"
install
composer"
block
:
-
name
:
"
install
epel"
yum
:
name
:
"
epel-release"
-
name
:
"
install
composer"
yum
:
name
:
"
composer"
-
name
:
"
import
composer
task"
import_tasks
:
"
composer.yml"
when
:
"
php_composer
|
bool"
-
name
:
"
Import
writable
paths"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment