additional course material RH294
Student User
2020-02-19 26d781da63ad0368921d6a0eb1f5efcb9bc479d1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
---
- name: Simple play that sets up webservers
  hosts: server
  become: true
  tasks:
    - name: install httpd package
      package:
        name: httpd
        state: present
    - name: ensure httpd is started and enabled
      service:
        name: httpd
        state: started
        enabled: true
      
- name: 'Next play to verify for the webserver process'
  hosts: server
  become: false
  remote_user: student
  tasks:
    - name: 'grep PIDs of httpd'
      command: pgrep httpd