init
This commit is contained in:
17
roles/configure-nginx/tasks/main.yml
Normal file
17
roles/configure-nginx/tasks/main.yml
Normal file
@ -0,0 +1,17 @@
|
||||
---
|
||||
- name: Prepare config file
|
||||
copy:
|
||||
src: files/web-{{ vhost_name }}.conf
|
||||
dest: /etc/nginx/sites-available/web-{{ vhost_name }}.conf
|
||||
|
||||
- name: Create a symbolic link
|
||||
file:
|
||||
src: /etc/nginx/sites-available/web-{{ vhost_name }}.conf
|
||||
dest: /etc/nginx/sites-enabled/web-{{ vhost_name }}.conf
|
||||
|
||||
- name: Restart Nginx
|
||||
systemd:
|
||||
name: nginx
|
||||
daemon_reload: yes
|
||||
enabled: yes
|
||||
state: started
|
1965
roles/configure-php/files/php8.1.ini
Normal file
1965
roles/configure-php/files/php8.1.ini
Normal file
File diff suppressed because it is too large
Load Diff
34
roles/configure-php/tasks/main.yml
Normal file
34
roles/configure-php/tasks/main.yml
Normal file
@ -0,0 +1,34 @@
|
||||
---
|
||||
|
||||
- name: PHP ini setup
|
||||
copy:
|
||||
src: files/php{{ php_version }}.ini
|
||||
dest: /etc/php/{{ php_version }}/cli/php.ini
|
||||
|
||||
- name: Increase PHP memory limit
|
||||
become: true
|
||||
lineinfile:
|
||||
dest: /etc/php/{{ php_version }}/cli/php.ini
|
||||
regexp: "memory_limit ="
|
||||
line: "memory_limit = 512M"
|
||||
|
||||
- name: Increase PHP upload time
|
||||
become: true
|
||||
lineinfile:
|
||||
dest: /etc/php/{{ php_version }}/cli/php.ini
|
||||
regexp: "max_input_time ="
|
||||
line: "max_input_time = 120"
|
||||
|
||||
- name: Increase PHP post size
|
||||
become: true
|
||||
lineinfile:
|
||||
dest: /etc/php/{{ php_version }}/cli/php.ini
|
||||
regexp: "post_max_size ="
|
||||
line: "post_max_size = 20M"
|
||||
|
||||
- name: Start PHP
|
||||
systemd:
|
||||
name: "{{ item }}"
|
||||
daemon_reload: yes
|
||||
enabled: yes
|
||||
state: started
|
15
roles/install-nginx/tasks/main.yml
Normal file
15
roles/install-nginx/tasks/main.yml
Normal file
@ -0,0 +1,15 @@
|
||||
---
|
||||
- name: Install Nginx
|
||||
apt:
|
||||
pkg:
|
||||
- nginx
|
||||
- certbot
|
||||
- python3-certbot-nginx
|
||||
|
||||
- name: Enable Nginx service
|
||||
systemd:
|
||||
name: nginx
|
||||
daemon_reload: yes
|
||||
enabled: yes
|
||||
state: started
|
||||
|
26
roles/install-php/tasks/main.yml
Normal file
26
roles/install-php/tasks/main.yml
Normal file
@ -0,0 +1,26 @@
|
||||
---
|
||||
- name: Install prerequisites
|
||||
apt:
|
||||
pkg:
|
||||
- lsb-release
|
||||
- ca-certificates
|
||||
- apt-transport-https
|
||||
- software-properties-common
|
||||
|
||||
- name: Add repository
|
||||
shell: add-apt-repository ppa:ondrej/php -y
|
||||
|
||||
- name: Install PHP
|
||||
apt:
|
||||
pkg:
|
||||
- php{{ php_version }}
|
||||
- php{{ php_version }}-cli
|
||||
- php{{ php_version }}-curl
|
||||
- php{{ php_version }}-mysql
|
||||
- php{{ php_version }}-fpm
|
||||
- php{{ php_version }}-gd
|
||||
- php{{ php_version }}-xml
|
||||
- php{{ php_version }}-mbstring
|
||||
- php{{ php_version }}-zip
|
||||
- php{{ php_version }}-soap
|
||||
- php{{ php_version }}-dev
|
5
roles/update-packages/tasks/main.yml
Normal file
5
roles/update-packages/tasks/main.yml
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
- name: Update system packages
|
||||
apt:
|
||||
name: '*'
|
||||
state: latest
|
Reference in New Issue
Block a user