mirror of
https://github.com/HanXHX/ansible-nginx.git
synced 2026-04-09 12:42:10 +07:00
Better readability
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
---
|
||||
|
||||
- name: APT | Install web apps
|
||||
pkgng: pkg={{ item }} state=present
|
||||
pkgng:
|
||||
pkg: "{{ item }}"
|
||||
state: present
|
||||
with_items:
|
||||
- nagios
|
||||
- backuppc
|
||||
@@ -12,17 +14,17 @@
|
||||
creates=/usr/local/etc/backuppc/config.pl
|
||||
|
||||
- name: FILE | Fix backuppc permissions
|
||||
file: >
|
||||
path=/usr/local/etc/backuppc/config.pl
|
||||
owner=backuppc
|
||||
group=backuppc
|
||||
file:
|
||||
path: /usr/local/etc/backuppc/config.pl
|
||||
owner: backuppc
|
||||
group: backuppc
|
||||
|
||||
- name: FILE | Fix fcgiwrap permission
|
||||
file: >
|
||||
path={{ nginx_fcgiwrap_sock }}
|
||||
mode=0640
|
||||
owner={{ nginx_user }}
|
||||
group={{ nginx_user }}
|
||||
file:
|
||||
path: "{{ nginx_fcgiwrap_sock }}"
|
||||
mode: 0640
|
||||
owner: "{{ nginx_user }}"
|
||||
group: "{{ nginx_user }}"
|
||||
|
||||
#
|
||||
# We don't manage BackupPC on FreeBSD... too dirty. :/
|
||||
|
||||
@@ -1,25 +1,35 @@
|
||||
---
|
||||
|
||||
- name: APT_REPOSITORY | Install backports
|
||||
apt_repository: repo='deb http://httpredir.debian.org/debian {{ ansible_distribution_release }}-backports main' state=present
|
||||
apt_repository:
|
||||
repo: 'deb http://httpredir.debian.org/debian {{ ansible_distribution_release }}-backports main'
|
||||
state: present
|
||||
|
||||
- block:
|
||||
|
||||
- name: APT | Install DotDeb key
|
||||
apt_key: url='http://www.dotdeb.org/dotdeb.gpg' state=present
|
||||
apt_key:
|
||||
url: 'http://www.dotdeb.org/dotdeb.gpg'
|
||||
state: present
|
||||
|
||||
- name: APT_REPOSITORY | Install dotdeb (PHP 7)
|
||||
apt_repository: repo='deb http://packages.dotdeb.org {{ ansible_distribution_release }} all' state=present
|
||||
apt_repository:
|
||||
repo: 'deb http://packages.dotdeb.org {{ ansible_distribution_release }} all'
|
||||
state: present
|
||||
|
||||
- name: LINEFILEFILE | Dotdeb priority (prevent install nginx from dotdeb)
|
||||
copy: >
|
||||
content="Package: *\nPin: release o=packages.dotdeb.org\nPin-Priority: 100"
|
||||
dest=/etc/apt/preferences
|
||||
copy:
|
||||
content: "Package: *\nPin: release o=packages.dotdeb.org\nPin-Priority: 100"
|
||||
dest: /etc/apt/preferences
|
||||
|
||||
when: ansible_distribution_release == 'jessie' and dotdeb
|
||||
|
||||
- name: APT | Install needed packages
|
||||
apt: pkg={{ item }} update_cache=yes cache_valid_time=3600 state=present
|
||||
apt:
|
||||
pkg: "{{ item }}"
|
||||
update_cache: yes
|
||||
cache_valid_time: 3600
|
||||
state: present
|
||||
with_items:
|
||||
- curl
|
||||
- fcgiwrap
|
||||
@@ -28,21 +38,31 @@
|
||||
- vim
|
||||
|
||||
- name: APT | Install PHP5.6
|
||||
apt: pkg={{ item }} update_cache=yes cache_valid_time=3600 state=present
|
||||
apt:
|
||||
pkg: "{{ item }}"
|
||||
update_cache: yes
|
||||
cache_valid_time: 3600
|
||||
state: present
|
||||
with_items:
|
||||
- php5-fpm
|
||||
- php5-sqlite
|
||||
when: nginx_php56
|
||||
|
||||
- name: APT | Install PHP7
|
||||
apt: pkg={{ item }} update_cache=yes cache_valid_time=3600 state=present
|
||||
apt:
|
||||
pkg: "{{ item }}"
|
||||
update_cache: yes
|
||||
cache_valid_time: 3600
|
||||
state: present
|
||||
with_items:
|
||||
- php7.0-fpm
|
||||
- php7.0-sqlite3
|
||||
when: nginx_php70
|
||||
|
||||
- name: SERVICE | Force start services
|
||||
service: name="{{ item.name }}" state=started
|
||||
service:
|
||||
name: "{{ item.name }}"
|
||||
state: started
|
||||
register: sf
|
||||
with_items:
|
||||
- { name: 'php5-fpm', cond: "{{ nginx_php56 }}" }
|
||||
|
||||
@@ -10,7 +10,9 @@
|
||||
port: 9000
|
||||
|
||||
- name: PKGNG | Install needed packages
|
||||
pkgng: pkg={{ item }} state=present
|
||||
pkgng:
|
||||
pkg: "{{ item }}"
|
||||
state: present
|
||||
with_items:
|
||||
- php56
|
||||
- curl
|
||||
@@ -18,7 +20,10 @@
|
||||
- nghttp2
|
||||
|
||||
- name: SERVICE | Force start services
|
||||
service: name={{ item }} state=started enabled=yes
|
||||
service:
|
||||
name: "{{ item }}"
|
||||
state: started
|
||||
enabled: yes
|
||||
register: sf
|
||||
with_items:
|
||||
- php-fpm
|
||||
|
||||
Reference in New Issue
Block a user