abdusamy.web_server_role

Deploy HTTP Server

Set up an Apache server, manage SELinux settings for ports and directories, and include a rollback feature.

Requirements

No specific requirements needed.

Role Variables

  • Define the port for the virtual host: vhost_port: 876

  • Define the root directory for the virtual host: vhost_dir: /vhosts (without a trailing slash)

Default Variables

  • Virtual host name: vhost_name: {{ ansible_hostname }}

  • Domain name: vhost_domain: {{ ansible_domain }}

Dependencies

No dependencies required.

Example Playbook to Run This Role

To use this role, run the following play:

 - name: Run web_server_role (Deploy httpd service)
   hosts: web
   tasks:
     - include_role:
         name: roles/abdusamy.web_server_role
       tags: [deploy, destroy, backup, check]

Save this play in a file named "run-role.yml".

Commands Guide

To deploy the web server, use this command:

ansible-playbook run-role.yml --tags deploy

To check your installed web server, use:

ansible-playbook run-role.yml --tags check

To roll back your web server, use:

ansible-playbook run-role.yml --tags destroy

To backup your web server configuration and homepage, use:

ansible-playbook run-role.yml --tags backup

License

MIT

Author Information

AbduSamy@GitHub

Informazioni sul progetto

Deploy http virtual hosts using customized configuration

Installa
ansible-galaxy install abdusamy.web_server_role
Licenza
Unknown
Download
78
Proprietario