buy tb500

ansible playbook: Install httpd, start httpd and change hostname


  • name: just for testing by ayad hosts: web1 tasks:
    • name: installing httpd
      yum:
      name: httpd
      state: present
    • name: starting the services
      service:
      name: httpd
      state: started
    • name: modify the hostname
      lineinfile:
      path: /etc/hosts
      regexp: ‘^127.0.0.1’
      line: 127.0.0.1 ayad.com.cm.my
      owner: root
      group: root
      mode: 0644

Leave a Reply