diff --git a/inventory_template/inventory.yml b/inventory_template/inventory.yml index 1864b2b..b2f25ee 100644 --- a/inventory_template/inventory.yml +++ b/inventory_template/inventory.yml @@ -15,6 +15,9 @@ all: resolver_dns_server: hosts: myFirstCentOSHost.example.org: + web_server: + hosts: + myFirstGentooHost.wirebrass.fr: munin_server: hosts: myFirstGentooHost.example.org: diff --git a/playbook_web_deploy.yml b/playbook_web_deploy.yml new file mode 100644 index 0000000..38e422b --- /dev/null +++ b/playbook_web_deploy.yml @@ -0,0 +1,9 @@ +--- +- hosts: web_server + roles: + - geerlingguy.nginx + - geerlingguy.certbot + +- hosts: web01.wirebrass.fr + roles: + - web_as208585.net diff --git a/roles/web_as208585.net/README.md b/roles/web_as208585.net/README.md new file mode 100644 index 0000000..bb14cb4 --- /dev/null +++ b/roles/web_as208585.net/README.md @@ -0,0 +1,39 @@ +Ansible Role: web_as208585.net +========= + +This role deploys as208585 webfiles on a GNU/Linux server. + +Requirements +------------ + +None. + +Role Variables +-------------- + +All variables and default values are defined in `defaults/main.yml` : + + # Files location for as208585.net website + website_location: "/var/www/html/as208585.net" + +Dependencies +------------ + +None. + +Example Playbook +---------------- + + - hosts: web_server + roles: + - web_as208585.net + +License +------- + +BSD + +Author Information +------------------ + +This role was created in 2020 by Nemo. diff --git a/roles/web_as208585.net/defaults/main.yml b/roles/web_as208585.net/defaults/main.yml new file mode 100644 index 0000000..796a48f --- /dev/null +++ b/roles/web_as208585.net/defaults/main.yml @@ -0,0 +1,9 @@ +--- +# defaults file for web_as208585.net + +# Files location for as208585.net website +website_location: "/var/www/html/as208585.net" + +# Web user +website_user: "www-data" +website_group: "www-data" diff --git a/roles/web_as208585.net/files/as208585.net_index.html b/roles/web_as208585.net/files/as208585.net_index.html new file mode 100644 index 0000000..2336e15 --- /dev/null +++ b/roles/web_as208585.net/files/as208585.net_index.html @@ -0,0 +1,21 @@ + + + + + + + AS208585 + + + + + +

AS208585

+

Links

+

+ PeeringDB
+ BGP HE
+ RIPE Anchor
+

+ + diff --git a/roles/web_as208585.net/handlers/main.yml b/roles/web_as208585.net/handlers/main.yml new file mode 100644 index 0000000..dc95b1e --- /dev/null +++ b/roles/web_as208585.net/handlers/main.yml @@ -0,0 +1,8 @@ +--- +# handlers file for web_as208585.net + +- name: "reload nginx" + service: + name: "nginx" + enabled: yes + state: reloaded diff --git a/roles/web_as208585.net/meta/main.yml b/roles/web_as208585.net/meta/main.yml new file mode 100644 index 0000000..898a30c --- /dev/null +++ b/roles/web_as208585.net/meta/main.yml @@ -0,0 +1,28 @@ +galaxy_info: + author: nemo + description: as208585 webfiles for GNU/Linux. + company: Wirebrass + + license: license (BSD) + + min_ansible_version: 2.4 + + platforms: + - name: Debian + versions: + - stretch + - buster + - name: Gentoo + versions: + - all + - name: EL + versions: + - 7 + + galaxy_tags: + - server + - as + - web + - nginx + +dependencies: [] diff --git a/roles/web_as208585.net/tasks/files.yml b/roles/web_as208585.net/tasks/files.yml new file mode 100644 index 0000000..49b3cd3 --- /dev/null +++ b/roles/web_as208585.net/tasks/files.yml @@ -0,0 +1,8 @@ +--- +- name: Website index.html page created + copy: + src: "as208585.net_index.html" + dest: "{{ website_location }}/index.html" + owner: "{{ website_user }}" + group: "{{ website_group }}" + mode: '0644' diff --git a/roles/web_as208585.net/tasks/location.yml b/roles/web_as208585.net/tasks/location.yml new file mode 100644 index 0000000..e52a2eb --- /dev/null +++ b/roles/web_as208585.net/tasks/location.yml @@ -0,0 +1,8 @@ +--- +- name: Website location created + file: + path: "{{ website_location }}" + state: directory + owner: "{{ website_user }}" + group: "{{ website_group }}" + mode: '0755' diff --git a/roles/web_as208585.net/tasks/main.yml b/roles/web_as208585.net/tasks/main.yml new file mode 100644 index 0000000..989fad0 --- /dev/null +++ b/roles/web_as208585.net/tasks/main.yml @@ -0,0 +1,5 @@ +--- +# Main tasks file for web_as208585.net + +- import_tasks: location.yml +- import_tasks: files.yml