-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbackend.yml
38 lines (33 loc) · 916 Bytes
/
backend.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
---
- hosts: servers
become: yes
gather_facts: yes
tasks:
- name: Instalando o pacote apache2 nos servidores Debian-Like
apt:
name: apache2
state: present
when: 'ansible_distribution == "Ubuntu"'
tags: install_apache_ubuntu
- name: Instalando o pacote httpd nos servidores Centos
yum:
name: httpd
state: present
when: 'ansible_distribution == "CentOS"'
tags: install_apache_centos
- name: Inicializar serviço apache
service:
name: apache2
state: started
enabled: yes
when: 'ansible_distribution == "Ubuntu"'
- name: Inicializar serviço apache
service:
name: httpd
state: started
enabled: yes
when: 'ansible_distribution == "CentOS"'
- name: Disable SELinux
selinux:
state: disabled
when: 'ansible_distribution == "CentOS"'