forked from MithunTechnologiesDevOps/AnisblePlayBooks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtags.yaml
29 lines (29 loc) · 733 Bytes
/
tags.yaml
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
---
- hosts: localhost
become: yes
tasks:
- name: Install Apache HTTP server on RedHat Server
tags:
- install
yum:
name: httpd
state: present
when: ansible_os_family == "RedHat"
- name: Install Apache HTTP server on Ubuntu server
tags:
- install
- start
apt:
name: apache2
state: present
when: ansible_os_family == "Debian"
- name: Install Apache HTTP server on CentOS server
yum:
name: httpd
state: present
when:
- ansible_facts['distribution'] == "CentOS"
- ansible_facts['distribution_major_version'] == "7"
- name: Print the Ansible free memory
debug:
msg: "free memory is {{ansible_memory_mb.real.free}}"