Ansible Roles

From rbachwiki
Revision as of 15:57, 30 June 2022 by Bacchas (talk | contribs) (Created page with "= Create Roles to organize playbooks= <code> --- - name: Install httpd package yum: name: httpd state: present - name: Start httpd service: name: httpd state: started - name: Open port for http firewalld: service: http permanent: true state: enabled - name: Restart firewalld service: name: firewalld state: reloaded </code>")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Create Roles to organize playbooks

--- - name: Install httpd package

 yum:
  name: httpd
  state: present

- name: Start httpd

 service:
  name: httpd
  state: started

- name: Open port for http

 firewalld:
  service: http
  permanent: true
  state: enabled

- name: Restart firewalld

 service:
  name: firewalld
  state: reloaded