PrestaShop 8.x has the following system requirements:
- System: Linux.
- Web server: Apache Web Server 2.4 or any later version, Nginx 1.0 or later (recomended).
- PHP: 8.0~8.1 (compatibility chart).
- MySQL: 5.6 minimum, a recent version is recommended.
Available variables are listed below, along with default values (see defaults/main.yml
):
If Prestashop has already been installed using this Ansible role, this version has to be higher than the current installed version (no downgrades for stability purpose).
see Prestashop releses on github
prestashop_version: 8.1.0
prestashop_download_url: "https://github.com/PrestaShop/PrestaShop/releases/download/{{ prestashop_version }}/prestashop_{{ prestashop_version }}.zip"
for security reasons, it is highly recommended to change this value with a random name, so that directory enumeration is made difficult for a potential attacker.
prestashop_backoffice_admin_folder: 'adminklwfjlkhF3DgG'
prestashop_root_path: "/var/www/{{ prestashop_domain }}"
prestashop_timezone
: Set timezone of instance.prestashop_language
: Language ISO code to install.prestashop_country
: Country of the shop.
prestashop_timezone: "America/New_York"
prestashop_language: "en"
prestashop_country: "en"
will be written in the database and .htaccess
file if using apache.
prestashop_domain: "prestashop.test"
prestashop_db_server
: Database server hostname. any valid MySQL valid server name or IP address.prestashop_db_user
: Database server user (will be created).prestashop_db_password
: Database server password. the valid password fordb_user
.prestashop_db_name
: Database name.prestashop_db_clear
: if set to1
, the installation process will drop existing tables inprestashop_db_name
.prestashop_db_create
: if set to1
,prestashop_db_name
will be created by the installation process.prestashop_db_prefix
: Prefix of table names.prestashop_db_prefix
: Engine for MySQL (InnoDB, MyISAM).
prestashop_db_server: "127.0.0.1"
prestashop_db_user: "prestashop"
prestashop_db_password: "prestashop"
prestashop_db_name: "prestashop"
prestashop_db_clear: 1
prestashop_db_create: 1
prestashop_db_prefix: "ps_"
prestashop_db_engine: "InnoDB"
prestashop_firstname
: Admin user firstname.prestashop_lastname
: Admin user lastname.prestashop_email
: Your email to connect to the Back Office.prestashop_password
: Password for the administration Back Office.
prestashop_firstname: "PrestaShop"
prestashop_lastname: "Developer"
prestashop_email: "dev@{{ prestashop_domain }}"
prestashop_password: "p_prestashop"
Those values are passed to the PHP installation script of Prestashop (more information here).
prestashop_name
: Name of the shop.prestashop_activity
: Id of an activity (Complete list of activities).prestashop_rewrite
: Enable rewrite engine.prestashop_fixtures
: Install fixtures. Equivalent of “Installation of demo products” in the GUI.
prestashop_name: "PrestaShop"
prestashop_activity: 0
prestashop_rewrite: 1
prestashop_fixtures: 0
prestashop_install_check: 'prestashop-install-ansible.txt'
- unzip
- php (see compatibility chart)
- mysql
Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:
- hosts: localhost
remote_user: root
roles:
- ansible-role-install-prestashop
Install the role with ansible-galaxy command:
ansible-galaxy install -p ansible-role-install-prestashop -f
This role was created in 2024 by ghorbani-ali.