No description
Find a file
2026-02-11 20:09:03 +01:00
.gitignore vps test 2026-02-11 20:09:03 +01:00
.rougailcli.yml output json 2026-02-11 16:51:50 +01:00
hosts.yml output json 2026-02-11 16:51:50 +01:00
install.sh vps test 2026-02-11 20:09:03 +01:00
install.yml vps test 2026-02-11 20:09:03 +01:00
install_rougail_lib.sh vps test 2026-02-11 20:09:03 +01:00
nginx_site_http.conf.j2 vps test 2026-02-11 20:09:03 +01:00
README.md readme 2026-02-11 11:59:57 +01:00
readme.md.old mv readme 2026-02-10 09:57:24 +01:00
requirements.txt vps test 2026-02-11 20:09:03 +01:00
rougail.sh vps test 2026-02-11 20:09:03 +01:00
structure.yml formatter 2026-02-11 11:59:36 +01:00
userdata.yml vps test 2026-02-11 20:09:03 +01:00

Vps target server system variables

Note

Path: vps

Variable Description
vps.domain_name
string mandatory
The domain name of the VPS.
Example: example.fr
vps.ssh_key
UNIX filename
Vps ssh private key.
- The ssh key path must be accessible (the file must be present)
- It is possible not to declare (if the ssh key is your default key).
Validators:
• this filename could be a relative path
• this file must exist
• file type allowed: "file"
Example: ./sshkeys/myssh_privatekey

Pedagogic html static file server

Note

This is a complete Ansible playbook to configure Nginx with basic authentication using htpasswd.
This playbook installs Nginx, configures a static website, and secures access with basic authentication.

Steps:.
\

  • Installation of Nginx: The playbook installs Nginx and ensures it is started and enabled.\
  • Creation of the website directory: A directory is created to host the website files.\
  • Creation of a simple homepage: A simple HTML page is created for the website.\
  • Installation of apache2-utils: This package is necessary to use the htpasswd command.\
  • Creation of the htpasswd file: A .htpasswd file is created with a username and password.\
  • Configuration of the Nginx site: The nginx_site.conf.j2 template is used to configure Nginx with basic authentication.\
  • Activation of the Nginx site: The site is enabled by creating a symbolic link in the sites-enabled directory.\
  • Testing the Nginx configuration: The Nginx configuration is tested before restarting the service.\
  • Restarting Nginx: Nginx is restarted to apply the changes.

    Dependencies:.
    \
  • ubuntu 24.04 linux distribution.
    Path: nginx
Variable Description
nginx.domain_name
domainname mandatory
Domain name.
Validator: type domainname
Default: the value of the variable "The domain name of the VPS"
Example: example.fr
nginx.email
mail mandatory
Email for the domain name.
This is for certbot.
Example: contact@exemple.fr
nginx.htpasswd_file
UNIX filename mandatory
Htpassword user credential file name.
Validator: file type allowed: "file"
Default: /etc/nginx/.htpasswd

Nginx authenticated user credentials

Note

This family contains lists of variable blocks.
Path: nginx.users

Variable Description
nginx.users.username
UNIX user multiple mandatory unique
Nginx user.
nginx.users.password
secret mandatory
Nginx password.