diff options
| author | Dennis Brentjes <d.brentjes@gmail.com> | 2016-08-28 16:08:42 +0200 |
|---|---|---|
| committer | Dennis Brentjes <d.brentjes@gmail.com> | 2016-08-28 16:14:56 +0200 |
| commit | 68515bbb478f326a252ca688fcc97f3fdc8c4f97 (patch) | |
| tree | 05954f1bf339c6ad973ed07736e0d328d5fbe3db /roles/php-fpm/tasks/main.yml | |
| download | ansible-68515bbb478f326a252ca688fcc97f3fdc8c4f97.tar.gz ansible-68515bbb478f326a252ca688fcc97f3fdc8c4f97.tar.bz2 ansible-68515bbb478f326a252ca688fcc97f3fdc8c4f97.zip | |
Initial commit, finally got around to cleanup and make it into a
gitrepo.
Diffstat (limited to 'roles/php-fpm/tasks/main.yml')
| -rw-r--r-- | roles/php-fpm/tasks/main.yml | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/roles/php-fpm/tasks/main.yml b/roles/php-fpm/tasks/main.yml new file mode 100644 index 0000000..3cc5600 --- /dev/null +++ b/roles/php-fpm/tasks/main.yml @@ -0,0 +1,25 @@ +--- +- name: Install php-fpm + become: yes + pacman: name=php-fpm state=present update_cache=yes + +- name: Set www user + become: yes + lineinfile: dest=/etc/php/php-fpm.d/www.conf regexp="{{item.regexp}}" line="{{item.line}}" + with_items: + - { regexp: "^user = http$", line: "user = {{ www_user }}" } + - { regexp: "^group = http$", line: "group = {{ www_user }}" } + - { regexp: "^listen.owner = http$", line: "listen.owner = {{ www_user }}" } + - { regexp: "^listen.group = http$", line: "listen.group = {{ www_user }}" } + +- name: Enable mysqli extension + become: yes + lineinfile: dest=/etc/php/php.ini regexp="^;extension=mysqli.so$" line="extension=mysqli.so" + +- name: Add /etc/webapps to open_basedir + become: yes + lineinfile: dest=/etc/php/php.ini regexp="^;open_basedir =$" line="open_basedir = /usr/share/webapps/:/tmp/:/etc/webapps/:/var/www/dump/hsboard/" + +- name: Start and enable php-fpm + become: yes + service: name=php-fpm state=started enabled=yes |
