Difference between revisions of "Install httpd on Red Hat server"

From MyWiki
Jump to: navigation, search
(Created page with "<source lang="yaml"> - name: Install HTTPD using Ansible Playbook hosts: slave-1 #here ensure that node instance name is correct or not become: true tasks: - name:...")
 
Line 1: Line 1:
 
<source lang="yaml">
 
<source lang="yaml">
 
- name: Install HTTPD using Ansible Playbook
 
- name: Install HTTPD using Ansible Playbook
   hosts: slave-1 #here ensure that node instance name is correct or not
+
   hosts: all
  become: true
+
 
   tasks:
 
   tasks:
 
     - name: Install HTTPD package
 
     - name: Install HTTPD package

Revision as of 10:42, 8 July 2024

- name: Install HTTPD using Ansible Playbook
  hosts: all
  tasks:
    - name: Install HTTPD package
      package:
        name: httpd
        state: present
    - name: Start HTTPD service
      service:
        name: httpd
        state: started
        enabled: yes