F
Size: a a a
АБ
PG
E
n🐈
t
L
E
YZ
VC
- name: Add PHP PPA
apt_repository:
repo: ppa:ondrej/php
update_cache: yes
filename: php
become: true
- name: Install PHP
apt:
name:
- php7.3-cli
- php7.3-fpm
- php7.3-mysql
- php7.3-redis
state: present
install_recommends: false
become: true
VC
Y
- name: Add PHP PPA
apt_repository:
repo: ppa:ondrej/php
update_cache: yes
filename: php
become: true
- name: Install PHP
apt:
name:
- php7.3-cli
- php7.3-fpm
- php7.3-mysql
- php7.3-redis
state: present
install_recommends: false
become: true
PG
VC
- name: Ensure nginx repository key is added
apt_key:
url: https://nginx.org/keys/nginx_signing.key
state: present
become: true
- name: Ensure nginx repository is added
apt_repository:
repo: "deb http://nginx.org/packages/ubuntu {{ ansible_distribution_release }} nginx"
state: present
filename: nginx
update_cache: true
become: true
- name: Ensure nginx is installed
apt:
name:
- nginx
- python3-passlib
state: present
become: true
- name: Ensure certbot is installed
apt:
name:
- certbot
- python3-certbot-nginx
state: present
become: true
- name: Check if certificate already exists.
stat:
path: "/etc/letsencrypt/live/{{ domain}}/cert.pem"
register: letsencrypt_cert
become: true
- name: Generate new certificate if one doesn't exist.
shell: "certbot certonly --nginx --noninteractive --agree-tos --email {{ mail}} --domains {{ domain }} ,www.{{ domain }}"
when: letsencrypt_cert.stat.exists == False
become: true
VC