{"id":344546,"date":"2023-01-26T21:01:05","date_gmt":"2023-01-26T21:01:05","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=344546"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=344546","title":{"rendered":"<span>\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 Ansible \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Molecule \u0427\u0430\u0441\u0442\u044c 2<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/553\/b74\/b1d\/553b74b1d315a5487582aab88db0d741.jpg\" width=\"1280\" height=\"720\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/553\/b74\/b1d\/553b74b1d315a5487582aab88db0d741.jpg\" data-blurred=\"true\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0411\u043e\u043b\u044c\u0448\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0439\u0442\u0435 \u0441 Molecule, \u0447\u0442\u043e\u0431\u044b \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0432\u0430\u0448\u0430 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u043e\u0432\u043a\u0443, \u0438\u0434\u0435\u043c\u043f\u043e\u0442\u0435\u043d\u0442\u043d\u043e\u0441\u0442\u044c, \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 \u0438 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0438 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0438 \u0432\u0435\u0431-\u0441\u0430\u0439\u0442\u0430 \u0432\u0430\u0448\u0438 \u0440\u043e\u043b\u0438 Ansible \u0432\u0435\u043b\u0438 \u0441\u0435\u0431\u044f \u0434\u043e\u043b\u0436\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c.  <\/p>\n<p>\u0412 <a href=\"https:\/\/habr.com\/ru\/company\/southbridge\/blog\/711432\/\">\u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0441\u0442\u0430\u0442\u044c\u0438<\/a> \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0438 \u043e\u0441\u043d\u043e\u0432\u044b \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 Molecule \u0438 \u043f\u0440\u043e\u0432\u0435\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0442\u0435\u0441\u0442\u043e\u0432. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0443\u0433\u043b\u0443\u0431\u0438\u043c\u0441\u044f \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e Molecule \u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u043d\u0430 \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c.<\/p>\n<p>\u041c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0437\u0430\u043f\u0443\u0441\u043a \u0434\u0432\u0443\u0445 \u0440\u0430\u0437\u043d\u044b\u0445 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432, \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0438\u0434\u0435\u043c\u043f\u043e\u0442\u0435\u043d\u0442\u043d\u043e\u0441\u0442\u0438 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e linting. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0439\u0442\u0438 \u043a\u043e\u0434 Ansible, \u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u044b \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u043c, \u043d\u0430 Github. \u041d\u0435 \u0441\u0442\u0435\u0441\u043d\u044f\u0439\u0442\u0435\u0441\u044c \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0434\u0430\u043b\u044c\u0448\u0435 \u043d\u0430 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u0437\u0434\u0435\u0441\u044c \u2014   <a href=\"https:\/\/github.com\/PCritchfield\/ansible\/tree\/master\/ansible_molecule_pt2\/laravel_website_corrected\/laravel_role\"><u>https:\/\/github.com\/PCritchfield\/ansible\/tree\/master\/ansible_molecule_pt2\/laravel_website_corrected\/laravel_role<\/u><\/a>.<\/p>\n<h2>\u0420\u043e\u043b\u044c<\/h2>\n<p>\u0420\u043e\u043b\u044c, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u0435\u0442 \u043e\u0442\u0440\u0430\u0436\u0430\u0442\u044c \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439. \u041e\u0434\u043d\u0430\u043a\u043e \u043e\u043d \u043d\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043a\u0430\u043a \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u043a \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044e. \u0421 \u0443\u0447\u0435\u0442\u043e\u043c \u0441\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0433\u043e, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0447\u0442\u043e \u043e\u043d \u0434\u0435\u043b\u0430\u0435\u0442.<\/p>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u044d\u0442\u043e\u0439 \u0440\u043e\u043b\u0438 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0438 \u0432\u0435\u0431-\u0441\u0430\u0439\u0442\u0430 Laravel. \u041e\u043d \u0443\u0447\u0430\u0441\u0442\u0432\u0443\u0435\u0442 \u0432 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 Nginx, PHP 8.1 (\u0438 \u043f\u0430\u043a\u0435\u0442\u043e\u0432), \u0430 \u0442\u0430\u043a\u0436\u0435 Composer; \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0440\u043e\u043b\u0438 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u043d \u0441\u0430\u0439\u0442 Laravel. \u041d\u0430\u043a\u043e\u043d\u0435\u0446, \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Molecule \u0434\u043b\u044f \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432, \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445, \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u044f \u0438\u0434\u0435\u043c\u043f\u043e\u0442\u0435\u043d\u0442\u043d\u043e\u0441\u0442\u0438 \u0438 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u0434\u0430 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430\u043c \u043a\u043e\u043c\u043f\u043e\u043d\u043e\u0432\u043a\u0438.<\/p>\n<pre><code>. \u251c\u2500\u2500 README.md \u251c\u2500\u2500 defaults \u2502   \u2514\u2500\u2500 main.yml \u251c\u2500\u2500 files \u2502   \u251c\u2500\u2500 database.php \u2502   \u2514\u2500\u2500 laravel.conf \u251c\u2500\u2500 handlers \u2502   \u2514\u2500\u2500 main.yml \u251c\u2500\u2500 meta \u2502   \u2514\u2500\u2500 main.yml \u251c\u2500\u2500 molecule \u2502   \u251c\u2500\u2500 collections.yml \u2502   \u251c\u2500\u2500 default \u2502   \u2502   \u251c\u2500\u2500 converge.yml \u2502   \u2502   \u251c\u2500\u2500 molecule.yml \u2502   \u2502   \u2514\u2500\u2500 tests \u2502   \u2502       \u251c\u2500\u2500 conftest.py \u2502   \u2502       \u2514\u2500\u2500 test_default.py \u2502   \u2514\u2500\u2500 requirements.yml \u251c\u2500\u2500 tasks \u2502   \u251c\u2500\u2500 deploy_site.yml \u2502   \u251c\u2500\u2500 main.yml \u2502   \u251c\u2500\u2500 nginx_install.yml \u2502   \u2514\u2500\u2500 php_install.yml \u251c\u2500\u2500 templates \u2502   \u2514\u2500\u2500 env.j2 \u251c\u2500\u2500 tests \u2502   \u251c\u2500\u2500 inventory \u2502   \u2514\u2500\u2500 test.yml \u2514\u2500\u2500 vars     \u2514\u2500\u2500 main.yml<\/code><\/pre>\n<h2>\u0417\u0430\u0434\u0430\u0447\u0430<\/h2>\n<p>\u041c\u043e\u0436\u043d\u043e \u043d\u0430\u0447\u0430\u0442\u044c \u0441 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0441 \u0437\u0430\u0434\u0430\u0447\u0430\u043c\u0438: <\/p>\n<pre><code>--- - name: Include Nginx install   include_tasks: nginx_install.yml  - name: Install php   include_tasks: php_install.yml  - name: Deploy website   include_tasks: deploy_site.yml<\/code><\/pre>\n<p>\u041e\u0442\u0441\u044e\u0434\u0430 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u0434\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u0432\u0435\u0431-\u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 (Nginx \u0438 PHP) \u0438 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u0432\u0435\u0431-\u0441\u0430\u0439\u0442\u0430 Laravel.<\/p>\n<p>\u0417\u0430\u0434\u0430\u0447\u0438 \u043f\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 Nginx \u043f\u0440\u043e\u0441\u0442\u044b: \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u0435 apt cache, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u043f\u0430\u043a\u0435\u0442\u044b, \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u0441\u043b\u0443\u0436\u0431\u0443 \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e. \u0417\u0434\u0435\u0441\u044c \u0432\u0430\u0436\u043d\u043e \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443 5 cache_valid_time: 3600. \u042d\u0442\u043e\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0433\u043e\u0432\u043e\u0440\u0438\u0442 Ansible \u043d\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c apt update, \u0435\u0441\u043b\u0438 \u043a\u044d\u0448 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d \u043c\u0435\u043d\u0435\u0435 3600 \u0441\u0435\u043a\u0443\u043d\u0434 \u043d\u0430\u0437\u0430\u0434, \u0447\u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u0434\u0435\u043c\u043f\u043e\u0442\u0435\u043d\u0442\u043d\u043e\u0441\u0442\u0438. \u042d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b \u0437\u0430\u0434\u0430\u0447\u0438 \u0442\u0430\u043a\u0436\u0435 \u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 Nginx \u0434\u043b\u044f \u0432\u0435\u0431-\u0441\u0430\u0439\u0442\u0430.<\/p>\n<pre><code>--- - name: Only run \"update_cache=yes\" if the last one is more than 3600 seconds ago   ansible.builtin.apt:     update_cache: yes     cache_valid_time: 3600  - name: install nginx   apt:     name: \"{{ item }}\"     state: present   with_items:     - nginx=1.18.*     - git  - name: Make sure a service unit is running   sysvinit:     state: started     name: nginx     enabled: true  - name: copy over config   copy:     src: laravel.conf     dest: \/etc\/nginx\/sites-available\/default     mode: u+rw,g-r,o-r<\/code><\/pre>\n<p><em>tasks\/nginx_install.yml<\/em><\/p>\n<pre><code>server {         listen 80 default_server;         listen [::]:80 default_server;          index index.php;         error_log  \/var\/log\/nginx\/error.log;         access_log \/var\/log\/nginx\/access.log;         root \/var\/www\/laravel\/public;         location ~ \\.php$ {             try_files $uri =404;             fastcgi_split_path_info ^(.+\\.php)(\/.+)$;             fastcgi_pass unix:\/run\/php\/php8.1-fpm.sock;             fastcgi_index index.php;             include fastcgi_params;             fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;             fastcgi_param PATH_INFO $fastcgi_path_info;         }         location \/ {            try_files $uri $uri\/ \/index.php?$query_string;         }  }<\/code><\/pre>\n<p><em>file\/laravel.conf<\/em><\/p>\n<p>\u0417\u0430\u0434\u0430\u0447\u0438 \u0432 php_install.yml \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u044f\u0442 PHP 8.1 \u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u043f\u0430\u043a\u0435\u0442\u044b, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0434\u043b\u044f \u0432\u0435\u0431-\u0441\u0430\u0439\u0442\u0430. \u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 PHP \u043c\u044b \u0442\u0430\u043a\u0436\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043c Composer. \u0421\u043f\u0438\u0441\u043e\u043a \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u0438 composer_path \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u0441\u043f\u0438\u0441\u043a\u0435 \u0432 <code>defaults\/main.yml<\/code>.  <\/p>\n<pre><code>- name: Only run \"update_cache=yes\" if the last one is more than 3600 seconds ago   ansible.builtin.apt:     update_cache: yes     cache_valid_time: 3600  - name: install php packages   apt:     name: \"{{ php_pkgs }}\"     state: present  - name: Checks if Composer is already installed   command: \"{{ composer_path }}\"   ignore_errors: true   register: composer_installed  - name: Install Composer if its not already installed   block:      - name: Download Composer Installation Script (if not already installed)       get_url:         url: https:\/\/getcomposer.org\/installer         dest: \/tmp\/composer-setup.php      - name: Run Composer Installer (if not already installed)       command:         cmd: \/usr\/bin\/php \/tmp\/composer-setup.php         creates: composer.phar      - name: Copy Composer Executable to \/usr\/local\/bin       become: true       copy:         src: composer.phar         dest: \/usr\/local\/bin\/composer         remote_src: yes         mode: '0755'      - name: Remove phar       file:         path: composer.phar         state: absent      - name: Remove Install Script       file:         path: \/tmp\/composer-setup.php         state: absent    when: composer_installed is failed<\/code><\/pre>\n<p><em>tasks\/php_install.yml<\/em><\/p>\n<pre><code>--- # defaults file for laravel_role php_pkgs:     - php8.1     - php8.1-mbstring     - php8.1-gettext     - php8.1-zip     - php8.1-fpm     - php8.1-curl     - php8.1-mysql     - php8.1-gd     - php8.1-cgi     - php8.1-soap     - php8.1-sqlite3     - php8.1-xml     - php8.1-redis     - php8.1-bcmath     - php8.1-imagick     - php8.1-intl  composer_path: \/usr\/local\/bin\/composer<\/code><\/pre>\n<p><em>defaults\/main.yml<\/em><\/p>\n<p>\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u043d\u0430\u0431\u043e\u0440 \u0437\u0430\u0434\u0430\u0447 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u0435\u0442 \u043a\u043e\u0434 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u0430 Laravel. \u042f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u043f\u0440\u043e\u0435\u043a\u0442, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u0414\u0436\u0435\u0444\u0444\u0440\u0438 \u0423\u044d\u0439, Laravel From Scratch Blog Project, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u0430\u0439\u0442 \u0431\u043b\u043e\u0433\u0430 \u043f\u0440\u0438 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0438 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c Molecule.<\/p>\n<p>\u0412\u044b\u0448\u0435\u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u043a\u043b\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0430 \u043d\u0430\u0448 \u0445\u043e\u0441\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u043a <code>.env<\/code>, \u0442\u0430\u043a \u0438 <code>databse.php<\/code> \u0444\u0430\u0439\u043b\u044b. \u041c\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0434\u043b\u044f \u0444\u0430\u0439\u043b\u0430 .env, \u0432 <code>molecule.yml<\/code>. \u0414\u0430\u043b\u0435\u0435 \u043c\u044b \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 Composer \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443. \u041d\u0430\u043a\u043e\u043d\u0435\u0446, \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c Artisan \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0439, \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 <code>APP_KEY<\/code> \u0434\u043b\u044f \u0437\u0430\u0449\u0438\u0442\u044b \u043d\u0430\u0448\u0435\u0433\u043e \u0441\u0430\u0439\u0442\u0430.<\/p>\n<pre><code>--- - name: create \/var\/www\/ directory   file:      dest: \/var\/www\/     state: directory     owner: www-data     group: www-data     mode: 0700  - block:   - name: Clone git repository     git:       dest: \/var\/www\/laravel       repo: https:\/\/github.com\/JeffreyWay\/Laravel-From-Scratch-Blog-Project.git       update: no     register: repo     - name: set .env file     template:       src: env.j2       dest: \/var\/www\/laravel\/.env    - name: set database.php conf file     copy:       src: database.php       dest: \/var\/www\/laravel\/config\/database.php       mode: u+rw,g-rw,o-r    - name: Composer update     command:       cmd: composer update       chdir: \/var\/www\/laravel    - name: composer install     command:       cmd: composer install       chdir: \/var\/www\/laravel    - name: php artisan steps     command:       cmd: php artisan {{ item }}       chdir: \/var\/www\/laravel     with_items:       - migrate --seed --force       - storage:link       - config:clear       - key:generate --force   become: true   become_user: www-data   notify:       - restart php8.1-fpm       - restart nginx<\/code><\/pre>\n<p><em>tasks\/deploy_site.php<\/em><\/p>\n<pre><code>DB_CONNECTION={{ lookup('env','DB_CONNECTION') }} DB_HOST={{ lookup('env','DB_HOST') }} DB_PORT={{ lookup('env','DB_PORT') }} DB_DATABASE={{ lookup('env','DB_DATABASE') }} DB_USERNAME={{ lookup('env','DB_USERNAME') }} DB_PASSWORD={{ lookup('env','DB_PASSWORD') }} APP_ENV={{ lookup('env','APP_ENV') }} APP_DEBUG={{ lookup('env','APP_DEBUG') }} APP_KEY=<\/code><\/pre>\n<p><em>templates\/.env.j2<\/em><\/p>\n<pre><code>&lt;?php  use Illuminate\\Support\\Str;  return [      'default' => env('DB_CONNECTION', 'mysql'),      'connections' => [          'mysql' => [             'driver' => 'mysql',             'url' => env('DATABASE_URL'),             'host' => env('DB_HOST', '127.0.0.1'),             'port' => env('DB_PORT', '3306'),             'database' => env('DB_DATABASE', 'forge'),             'username' => env('DB_USERNAME', 'forge'),             'password' => env('DB_PASSWORD', ''),             'unix_socket' => env('DB_SOCKET', ''),             'charset' => 'utf8mb4',             'collation' => 'utf8mb4_unicode_ci',             'prefix' => '',             'prefix_indexes' => true,             'strict' => true,             'engine' => 'InnoDB ROW_FORMAT=DYNAMIC',             'options' => extension_loaded('pdo_mysql') ? array_filter([                 PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),             ]) : [],         ],      ],      'migrations' => 'migrations',  ];<\/code><\/pre>\n<p><em>files\/database.php<\/em><\/p>\n<p>\u0412\u043e\u0442 \u0441 \u0447\u0435\u0433\u043e \u043c\u044b \u043d\u0430\u0447\u043d\u0435\u043c. \u0418\u043c\u0435\u0439\u0442\u0435 \u0432 \u0432\u0438\u0434\u0443, \u0447\u0442\u043e \u043c\u044b \u043d\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c \u0441\u0430\u043c \u0432\u0435\u0431-\u0441\u0430\u0439\u0442 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Molecule, \u043c\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u0441\u0430\u0439\u0442\u0430. \u0418 \u043f\u043e \u043c\u0435\u0440\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043c\u044b \u0438\u0441\u0441\u043b\u0435\u0434\u0443\u0435\u043c \u0438\u0434\u0435\u043c\u043f\u043e\u0442\u0435\u043d\u0442\u043d\u043e\u0441\u0442\u044c \u0438 linting, \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c \u044d\u0442\u0438 \u0444\u0430\u0439\u043b\u044b. \u041d\u043e, \u043f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043c\u044b \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a \u043a\u043e\u043c\u043f\u043e\u043d\u043e\u0432\u043a\u0435, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u043c\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 \u0438\u043b\u0438 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0431\u0435\u0437 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445. \u0427\u0442\u043e\u0431\u044b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e, \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u043d\u0430\u0448\u0435\u0439 Molecule \u0438 \u043d\u0430 \u0442\u043e, \u043a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432.  <\/p>\n<h2>Molecule<\/h2>\n<p><strong>\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b: \u041d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432<\/strong><\/p>\n<p>\u041e\u0434\u043d\u0438\u043c \u0438\u0437 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432 Molecule \u0438 Docker \u2013  \u043e\u043d\u0438 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430 \u0434\u043b\u044f \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432. \u0430 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u043b\u0438 \u0440\u043e\u043b\u044c \u043e\u0431\u043c\u0435\u043d\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f\u043c\u0438, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c. \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0430\u043c \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 MySQL, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 \u0438 \u0432\u0432\u0435\u0441\u0442\u0438 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0439 \u0440\u043e\u043b\u0438 Laravel.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u0444\u0430\u0439\u043b molecule.yml. \u041f\u043e\u0434\u043e\u0431\u043d\u043e \u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043c\u044b \u0434\u0435\u043b\u0430\u043b\u0438 \u0432 \u0447\u0430\u0441\u0442\u0438 1, \u0432 \u0431\u043b\u043e\u043a\u0435 platforms: &#8212; \u044d\u0442\u043e \u0442\u043e \u043c\u0435\u0441\u0442\u043e, \u0433\u0434\u0435 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043d\u0430\u0448\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b. \u042d\u0442\u043e\u0442 \u0440\u0430\u0437\u0434\u0435\u043b \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0430\u043c \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e docker-compose. \u0417\u0434\u0435\u0441\u044c \u043c\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u0441\u0435\u0442\u0438, \u0442\u043e\u043c\u0430, \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0438 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0435 \u043f\u043e\u0440\u0442\u044b. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u0431\u043e\u0440\u0430 \u0442\u0435\u0441\u0442\u043e\u0432 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0435 \u0414\u0436\u0435\u0444\u0444\u043e\u043c \u0413\u0435\u0440\u043b\u0438\u043d\u0433\u043e\u043c. \u042d\u0442\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u044b \u0434\u043b\u044f \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432, \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044b\u0445 Ansible \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430\u0445.<\/p>\n<pre><code>platforms:   - name: site     image: \"geerlingguy\/docker-ubuntu2204-ansible:latest\"     volumes:       - \/sys\/fs\/cgroup:\/sys\/fs\/cgroup:ro     privileged: true     pre_build_image: true     published_ports:       - 0.0.0.0:8080:80\/tcp     networks:       - name: \"laravel\"   - name: mysql     image: \"geerlingguy\/docker-ubuntu2204-ansible:latest\"     volumes:       - \/sys\/fs\/cgroup:\/sys\/fs\/cgroup:ro     privileged: true     pre_build_image: true     published_ports:       - 0.0.0.0:3306:3306\/tcp     networks:       - name: \"laravel\"<\/code><\/pre>\n<p>\u041a\u0440\u0430\u0442\u043a\u043e\u0435 \u043e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u0438\u0435 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043e\u043f\u0446\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u0437\u0434\u0435\u0441\u044c:<\/p>\n<p><code>name<\/code>: \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0438\u043c\u0435\u043d\u0438 \u0445\u043e\u0441\u0442\u0430 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u043a\u0430\u043a \u0434\u043b\u044f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043d\u043e\u0439 \u0441\u0435\u0442\u0438, \u0442\u0430\u043a \u0438 \u0434\u043b\u044f \u0438\u043d\u0432\u0435\u043d\u0442\u0430\u0440\u0438\u0437\u0430\u0446\u0438\u0438 Ansible<\/p>\n<p><code>Volumes<\/code>: \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0442\u043e\u043c\u0430 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0441\u043b\u0443\u0436\u0431\u044b systemd<\/p>\n<p><code>privlaged<\/code>: \u043e\u043f\u0446\u0438\u044f \u0441\u043e\u043e\u0431\u0449\u0430\u0435\u0442 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0443, \u0434\u043e\u043b\u0436\u0435\u043d \u043b\u0438 \u043e\u043d \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u0438\u043c\u0435\u043d\u0438 root<\/p>\n<p><code>pre_build_image:<\/code> \u043e\u043f\u0446\u0438\u044f \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u044f\u0435\u0442 Molecule \u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0438\u0437 \u0440\u0435\u0435\u0441\u0442\u0440\u0430 \u0432\u043c\u0435\u0441\u0442\u043e \u0435\u0433\u043e \u0441\u0431\u043e\u0440\u043a\u0438<\/p>\n<p><code>published_ports:<\/code> \u043a\u0430\u043a \u0438 <code>-p<\/code> \u0434\u043b\u044f Docker, \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 Molecule \u043d\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u043e\u0440\u0442\u043e\u0432 \u043c\u0435\u0436\u0434\u0443 \u0445\u043e\u0441\u0442\u043e\u043c \u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u043c. \u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u043a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u0443 \u043d\u0430\u0441 \u0431\u0443\u0434\u0435\u0442 \u0443\u0441\u043f\u0435\u0448\u043d\u044b\u0439 converge, \u043c\u044b \u0441\u043c\u043e\u0436\u0435\u043c \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043d\u0430 <code>localhost: 8080<\/code> \u0438 \u0443\u0432\u0438\u0434\u0435\u0442\u044c, \u0447\u0442\u043e \u043d\u0430\u0448 \u0441\u0430\u0439\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.<\/p>\n<p><code>networks:<\/code> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 <code>docker network<\/code> \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432. \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0443\u0436\u043d\u0430\u044f \u043d\u0430\u043c \u0441\u0435\u0442\u044c \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u201claravel\u201d.<\/p>\n<p>\u0412\u0430\u0436\u043d\u043e \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u043e\u0435 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u0432 \u044d\u0442\u043e\u043c \u0431\u043b\u043e\u043a\u0435. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u044b \u043c\u043e\u0433\u043b\u0438 \u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0440\u043e\u043b\u0438 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e \u0438\u043b\u0438 \u0438\u0434\u0435\u043d\u0442\u0438\u0447\u043d\u044b\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430. \u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435, \u0447\u0442\u043e \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u0432 \u0432\u0438\u0434\u0443 \u2013 \u044d\u0442\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435, \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0435 \u0432 <code>platforms:<\/code> \u043a\u0430\u043a \u0438\u043c\u0435\u043d\u043d\u043e Molecule \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0438\u0445 \u0432 \u0431\u043b\u043e\u043a\u0435 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0432\u0430\u0448\u0435\u0433\u043e \u0438\u043d\u0432\u0435\u043d\u0442\u0430\u0440\u044f.<\/p>\n<p><strong>Provisioner: \u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0441\u0440\u0435\u0434\u044b<\/strong><\/p>\n<p>\u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043c\u0435\u0442\u043e\u0434\u043e\u0432 Ansible \u0438 Molecule \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0441\u0440\u0435\u0434\u044b. \u042f \u0440\u0435\u0448\u0438\u043b \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0438\u0445 \u0432 \u0431\u043b\u043e\u043a\u0435 Provisioner \u043f\u043e \u0434\u0432\u0443\u043c \u043f\u0440\u0438\u0447\u0438\u043d\u0430\u043c. \u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u044d\u0442\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u0447\u0435\u0442\u043a\u043e\u0441\u0442\u044c \u0447\u0442\u0435\u043d\u0438\u044f <code>molecule.yml<\/code>, \u0442\u0430\u043a \u043a\u0430\u043a \u0432\u0441\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u043e\u0434\u043d\u043e\u043c \u043c\u0435\u0441\u0442\u0435. \u0412\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043c\u044b \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435, \u0447\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0430\u0448\u0443 \u0440\u043e\u043b\u044c Laravel \u0441 Molecule, \u043c\u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043e\u0434\u043d\u043e \u043c\u0435\u0441\u0442\u043e \u0434\u043b\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u043a\u0430\u043a \u0441\u0430\u0439\u0442\u0443, \u0442\u0430\u043a \u0438 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<pre><code>provisioner:   name: ansible   env:     DB_CONNECTION: mysql     DB_HOST: mysql     DB_PORT: 3306     DB_DATABASE: blog     DB_USERNAME: molecule     DB_PASSWORD: moleculepass     APP_ENV: local     APP_DEBUG: true<\/code><\/pre>\n<p><strong>Converge:\u0434\u0435\u043f\u043b\u043e\u0439 \u0434\u0432\u0443\u0445 \u0440\u043e\u043b\u0435\u0439<\/strong>  <\/p>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0434\u0432\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0432 \u043e\u0431\u0449\u0435\u0439 \u0441\u0435\u0442\u0438 \u0438 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c Ansible \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0441\u0440\u0435\u0434\u044b. \u0418\u0442\u0430\u043a, \u043a\u0430\u043a \u0436\u0435 \u043d\u0430\u043c \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c \u044d\u0442\u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b? \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432. \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u043d\u0430\u0447\u0430\u0442\u044c \u0441 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>Ansible Galaxy<\/code> \u0438 \u0444\u0430\u0439\u043b\u0430 <code>requirements.yml<\/code>. \u0417\u0430\u0442\u0435\u043c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0431\u043b\u043e\u043a <code>dependency:<\/code> \u0432 \u043d\u0430\u0448 \u0444\u0430\u0439\u043b Molecule.  <\/p>\n<pre><code>dependency:   name: galaxy   options:     ignore-certs: True     ignore-errors: True     role-file: molecule\/requirements.yml<\/code><\/pre>\n<p><em>dependency block for molecule.yml<\/em><\/p>\n<pre><code>--- roles:   - name: geerlingguy.mysql-fork     src: https:\/\/github.com\/PCritchfield\/ansible-role-mysql.git<\/code><\/pre>\n<p><em>molecule\/requirements.yml<\/em><\/p>\n<p>\u042d\u0442\u0438 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u044b \u0441\u043e\u043e\u0431\u0449\u0430\u044e\u0442 Molecule, \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043c\u043e\u044e \u0440\u0430\u0437\u0432\u0438\u043b\u043a\u0443 \u0440\u043e\u043b\u0438 <code>geerlingguy.mysql<\/code> \u0441 GitHub, \u043f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043c\u044b \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u043d\u0430\u0448 converge. \u0422\u0435\u043f\u0435\u0440\u044c, \u043a\u043e\u0433\u0434\u0430 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0440\u043e\u043b\u044c, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442 MySQL \u0432 \u043d\u0430\u0448 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440, \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0435\u0435. \u041c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0432\u0437\u0433\u043b\u044f\u043d\u0443\u0442\u044c \u043d\u0430 \u043d\u0430\u0448 \u0444\u0430\u0439\u043b <code>converge.yml<\/code>. \u0412 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u043b\u043e\u0441\u044c, \u0447\u0442\u043e converge.yml \u2013 \u044d\u0442\u043e \u0443\u0447\u0435\u0431\u043d\u043e\u0435 \u043f\u043e\u0441\u043e\u0431\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 Molecule \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043d\u0430\u0448\u0438\u0445 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432. \u0421 \u044d\u0442\u043e\u0439 \u0446\u0435\u043b\u044c\u044e \u043d\u0430\u0448\u0435\u043c\u0443 converge \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0442\u0430\u0440\u0433\u0435\u0442\u0438\u043d\u0433 \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0445\u043e\u0441\u0442\u043e\u0432. \u0420\u0430\u043d\u0435\u0435 \u044f \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043b, \u0447\u0442\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u044b \u0434\u0430\u0435\u043c \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0443 \u0432 \u0431\u043b\u043e\u043a\u0435 <code>platforms:<\/code>\u00a0 \u2013 \u044d\u0442\u043e \u0442\u043e, \u0447\u0442\u043e Molecule \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0434\u043b\u044f \u0438\u043d\u0432\u0435\u043d\u0442\u0430\u0440\u0438\u0437\u0430\u0446\u0438\u0438, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044f \u043d\u0430\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u0445\u043e\u0436\u0435\u0435 \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<pre><code>--- - name: Converge - DB   hosts: mysql   vars:     mysql_databases:       - name: \"{{ lookup('env','DB_DATABASE') }}\"     mysql_users:       - name: \"{{ lookup('env','DB_USERNAME') }}\"         password: \"{{ lookup('env','DB_PASSWORD') }}\"         host: site.laravel         priv: \"*.*:ALL\"   tasks:     - name: \"Setup MySQL DB\"       include_role:         name: \"geerlingguy.mysql-fork\"  - name: Converge - Site   hosts: site   tasks:     - name: \"Include laravel_role\"       include_role:         name: \"laravel_role\"<\/code><\/pre>\n<p>\u0412 \u044d\u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442 <code>molecule.yml<\/code> \u0434\u043e\u043b\u0436\u0435\u043d \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a:  <\/p>\n<pre><code>--- dependency:   name: galaxy   options:     ignore-certs: True     ignore-errors: True     role-file: molecule\/requirements.yml driver:   name: docker platforms:   - name: site     image: \"geerlingguy\/docker-ubuntu2204-ansible:latest\"     volumes:       - \/sys\/fs\/cgroup:\/sys\/fs\/cgroup:ro     privileged: true     pre_build_image: true     published_ports:       - 0.0.0.0:8080:80\/tcp     networks:       - name: \"laravel\"   - name: mysql     image: \"geerlingguy\/docker-centos7-ansible:latest\"     volumes:       - \/sys\/fs\/cgroup:\/sys\/fs\/cgroup:ro     privileged: true     pre_build_image: true     published_ports:       - 0.0.0.0:3306:3306\/tcp     networks:       - name: \"laravel\" provisioner:   name: ansible   env:     DB_CONNECTION: mysql     DB_HOST: mysql     DB_PORT: 3306     DB_DATABASE: blog     DB_USERNAME: molecule     DB_PASSWORD: moleculepass     APP_ENV: local     APP_DEBUG: true verifier:   name: testinfra<\/code><\/pre>\n<p>\u041d\u0430\u043a\u043e\u043d\u0435\u0446, \u0432\u0441\u044f \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0430, \u0438 \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0443: <code>molecule converge<\/code> . \u0415\u0441\u043b\u0438 \u0432\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e, Molecule \u0434\u043e\u043b\u0436\u0435\u043d \u0438\u0437\u0432\u043b\u0435\u0447\u044c \u0440\u043e\u043b\u044c MySQL \u0438\u0437 Galaxy, \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0434\u0432\u0430 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043f\u043b\u0435\u0439\u0431\u0443\u043a\u0438 \u043d\u0430 \u0438\u0445 \u0446\u0435\u043b\u0435\u0432\u044b\u0445 \u0445\u043e\u0441\u0442\u0430\u0445. \u041c\u044b \u043f\u0443\u0431\u043b\u0438\u043a\u0443\u0435\u043c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430\u0445, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a http:\/\/localhost:8080 \u0438 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0441 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u043c \u0431\u043b\u043e\u0433\u043e\u043c. <\/p>\n<h2>\u0418\u0434\u0435\u043c\u043f\u043e\u0442\u0435\u043d\u0442\u043d\u043e\u0441\u0442\u044c?<\/h2>\n<p>\u0418 \u0434\u0430, \u0438 \u043d\u0435\u0442.<\/p>\n<p>\u0414\u0430, \u0442\u0430\u043a \u043a\u0430\u043a \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0437\u0430\u0434\u0430\u0447\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0437\u0430\u0432\u0438\u0441\u044f\u0442 \u043e\u0442 \u0440\u0430\u0437\u043d\u044b\u0445 \u0445\u043e\u0441\u0442\u043e\u0432, \u043c\u043e\u0433\u0443\u0442 \u0434\u0435\u043b\u0430\u0442\u044c \u0442\u043e, \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e.<\/p>\n<p>\u041d\u0435\u0442, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0437 \u044d\u0442\u0438\u0445 \u0437\u0430\u0434\u0430\u0447 \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0442\u0441\u044f \u043d\u0435\u0443\u0434\u0430\u0447\u0435\u0439 \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u043d\u0430 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435. \u042d\u0442\u0438 \u0441\u0431\u043e\u0438 \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u0433\u043e\u043b\u043e\u0432\u043d\u043e\u0439 \u0431\u043e\u043b\u0438 \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u0438\u043b\u0438, \u0447\u0442\u043e \u0435\u0449\u0435 \u0445\u0443\u0436\u0435, \u043a \u043f\u0440\u043e\u0441\u0442\u043e\u044e \u0432 \u043f\u0440\u043e\u0434\u0435.<\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043d\u0430\u0447\u043d\u0435\u043c \u0441 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0438\u0434\u0435\u043c\u043f\u043e\u0442\u0435\u043d\u0442\u043d\u043e\u0441\u0442\u0438. \u0421\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u0412\u0438\u043a\u0438\u043f\u0435\u0434\u0438\u0438, \u201c\u0418\u0434\u0435\u043c\u043f\u043e\u0442\u0435\u043d\u0442\u043d\u043e\u0441\u0442\u044c \u2013 \u044d\u0442\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u0432 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0435 \u0438 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u043a\u0435, \u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e\u043c \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u044b \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437 \u0431\u0435\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u0437\u0430 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u043c\u0438 \u043f\u0435\u0440\u0432\u043e\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u201d. \u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e \u043e\u0442 \u0442\u043e\u0433\u043e, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437 \u043c\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043f\u043b\u0435\u0439\u0431\u0443\u043a\u0438 Ansible, \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438 \u043f\u0435\u0440\u0432\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0437\u0430\u0434\u0430\u0447\u0438.<\/p>\n<p>\u0412\u043e\u0442 \u043f\u043e\u0447\u0435\u043c\u0443 \u0438\u0434\u0435\u043c\u043f\u043e\u0442\u0435\u043d\u0442\u043d\u043e\u0441\u0442\u044c \u0436\u0438\u0437\u043d\u0435\u043d\u043d\u043e \u0432\u0430\u0436\u043d\u0430 \u0434\u043b\u044f \u0432\u0430\u0448\u0438\u0445 \u0440\u043e\u043b\u0435\u0439 Ansible. \u0417\u0430\u0447\u0435\u043c \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u0434\u0432\u0430\u0436\u0434\u044b? \u041d\u0435 \u0440\u0438\u0441\u043a\u0443\u0439\u0442\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c \u0442\u0435\u043a\u0443\u0449\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e Java \u0438\u043b\u0438 Nginx, \u043a\u043e\u0433\u0434\u0430 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Molecule \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439, \u0435\u0441\u043b\u0438 \u0432\u044b \u0434\u0432\u0430\u0436\u0434\u044b \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u0441\u0432\u043e\u044e \u0440\u043e\u043b\u044c.<\/p>\n<p>\u041a\u043e\u0433\u0434\u0430 \u043c\u044b \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 idempotence, Molecule \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442 <code>converge.yml<\/code> \u0438 \u0443\u0431\u0435\u0434\u0438\u0442\u0441\u044f, \u0447\u0442\u043e \u043d\u0438 \u043e\u0434\u043d\u0430 \u0438\u0437 \u0437\u0430\u0434\u0430\u0447 \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u044d\u0442\u043e\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442. \u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 <code>molecule idempotence<\/code>, \u0438 \u0432\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<pre><code>PLAY RECAP ********************************************************************* mysql                      : ok=32   changed=1    unreachable=0    failed=0    skipped=23   rescued=0    ignored=0 site                       : ok=20   changed=7    unreachable=0    failed=0    skipped=5    rescued=0    ignored=0 CRITICAL Idempotence test failed because of the following tasks: *  => geerlingguy.mysql : Ensure MySQL users are present. *  => geerlingguy.mysql : Ensure MySQL users are present. *  => laravel_role : Checks if Composer is already installed *  => laravel_role : set .env file *  => laravel_role : Composer update *  => laravel_role : composer install *  => laravel_role : php artisan steps *  => laravel_role : php artisan steps *  => laravel_role : php artisan steps *  => laravel_role : php artisan steps *  => laravel_role : php artisan steps *  => laravel_role : php artisan steps<\/code><\/pre>\n<p>\u041c\u044b \u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0434\u0430\u0447 \u0432\u043d\u043e\u0441\u044f\u0442 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0435 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u044b. \u041c\u044b \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u043c \u0432\u0438\u0434\u0435\u0442\u044c, \u0447\u0442\u043e \u0440\u043e\u043b\u044c geerlingguy.mysql \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u0441\u0431\u043e\u044e \u043d\u0430\u0448\u0435\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043d\u0430 \u0438\u0434\u0435\u043c\u043f\u043e\u0442\u0435\u043d\u0442\u043d\u043e\u0441\u0442\u044c, \u043d\u043e \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043c\u044b \u043d\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c \u044d\u0442\u0443 \u0440\u043e\u043b\u044c, \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u043d\u0430\u0448\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430 \u0438\u0434\u0435\u043c\u043f\u043e\u0442\u0435\u043d\u0442\u043d\u043e\u0441\u0442\u044c \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u0443\u0435\u0442 \u044d\u0442\u0443 \u0447\u0430\u0441\u0442\u044c converge. \u0427\u0442\u043e\u0431\u044b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443 <code>tags: molecule-idempotence-notest<\/code>.<\/p>\n<pre><code>--- - name: Converge - DB   hosts: mysql   vars:     mysql_databases:       - name: \"{{ lookup('env','DB_DATABASE') }}\"     mysql_users:       - name: \"{{ lookup('env','DB_USERNAME') }}\"         password: \"{{ lookup('env','DB_PASSWORD') }}\"         host: site.laravel         priv: \"*.*:ALL\"   tasks:     - name: \"Setup MySQL DB\"       include_role:         name: \"geerlingguy.mysql\"   tags: molecule-idempotence-notest  - name: Converge - Site   hosts: site   tasks:     - name: \"Include laravel_role\"       include_role:         name: \"laravel_role\"<\/code><\/pre>\n<p>\u041a\u0430\u043a \u0438 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u0442\u0435\u0433\u043e\u0432 Ansible, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e \u0432 \u043b\u044e\u0431\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438. \u0417\u0434\u0435\u0441\u044c \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0435\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0432\u0441\u044e \u0440\u043e\u043b\u044c, \u043d\u043e \u043c\u044b \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0433\u043b\u0438 \u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0434\u043b\u044f \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430 \u0437\u0430\u0434\u0430\u0447. \u0421 \u044d\u0442\u0438\u043c \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0438\u0434\u0435\u043c\u043f\u043e\u0442\u0435\u043d\u0442\u043d\u043e\u0441\u0442\u0438. Molecule \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u043e\u0438\u0433\u043d\u043e\u0440\u0438\u0440\u0443\u0435\u0442 \u043f\u0435\u0440\u0432\u044b\u0439 \u0440\u0430\u0437\u0434\u0435\u043b converge, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u0446\u0435\u043b\u0435\u043d \u043d\u0430 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445, \u0438 \u0432\u044b\u0434\u0430\u0441\u0442 \u043d\u0430\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code>PLAY RECAP ********************************************************************* site                       : ok=20   changed=7    unreachable=0    failed=0    skipped=5    rescued=0    ignored=0 CRITICAL Idempotence test failed because of the following tasks: *  => laravel_role : Checks if Composer is already installed *  => laravel_role : set .env file *  => laravel_role : Composer update *  => laravel_role : composer install *  => laravel_role : php artisan steps *  => laravel_role : php artisan steps *  => laravel_role : php artisan steps *  => laravel_role : php artisan steps *  => laravel_role : php artisan steps *  => laravel_role : php artisan steps<\/code><\/pre>\n<p>\u041e\u0442\u043b\u0438\u0447\u043d\u043e, \u0432 \u0438\u0442\u043e\u0433\u043e\u0432\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0435\u0442 \u0445\u043e\u0441\u0442\u0430 MySQL. \u0422\u0435\u043f\u0435\u0440\u044c, \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u0437\u043d\u0430\u0435\u043c, \u0447\u0442\u043e \u043d\u0430\u0448\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 Molecule \u0431\u0443\u0434\u0443\u0442 \u043d\u0430\u0446\u0435\u043b\u0435\u043d\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u043c\u044b \u0445\u043e\u0442\u0438\u043c, \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043e\u0447\u0438\u0441\u0442\u0438\u0442\u044c \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u0434\u0430. \u041f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u043e \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043c\u044b \u0437\u043d\u0430\u0435\u043c, \u043a\u0430\u043a\u0438\u0435 \u0438\u043c\u0435\u043d\u043d\u043e \u0437\u0430\u0434\u0430\u0447\u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0442 \u043d\u0430\u0448\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 \u0438\u0434\u0435\u043c\u043f\u043e\u0442\u0435\u043d\u0442\u043d\u043e\u0441\u0442\u044c\u044e. \u041c\u044b \u043d\u0430\u0447\u043d\u0435\u043c \u0441 \u0441\u0430\u043c\u043e\u0433\u043e \u043d\u0430\u0447\u0430\u043b\u0430 \u0437\u0430\u0434\u0430\u0447\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 Composer.<\/p>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043d\u0430\u043b\u0438\u0447\u0438\u044f \u0434\u0432\u043e\u0438\u0447\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 Composer, \u043e\u043d \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u043d\u044b\u0439. \u0427\u0442\u043e \u043d\u0430\u0441 \u0432\u043e\u043b\u043d\u0443\u0435\u0442, \u0442\u0430\u043a \u044d\u0442\u043e \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <code>changed_when: false<\/code>\u00a0 \u043a \u0437\u0430\u0434\u0430\u0447\u0435 <code>Checks if Composer is already installed<\/code> \u0432 <code>php_install.yml<\/code>.<\/p>\n<pre><code>- name: Checks if Composer is already installed   command: \"{{ composer_path }}\"   ignore_errors: true   register: composer_installed   changed_when: false<\/code><\/pre>\n<p>\u041e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0441\u0431\u043e\u0438 \u0438\u0434\u0435\u043c\u043f\u043e\u0442\u0435\u043d\u0442\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u044f\u0442 \u0438\u0437 <code>deploy_site.yml<\/code>. \u0415\u0441\u043b\u0438 \u043c\u044b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0442\u043e \u0443\u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u043c\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0434\u0430\u0447, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0442\u0440\u0435\u0431\u0443\u044e\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438 \u043f\u0435\u0440\u0432\u043e\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u043c \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0438 \u0441\u0430\u0439\u0442\u0430. \u0427\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u044d\u0442\u043e, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u044d\u0442\u0438 \u0437\u0430\u0434\u0430\u0447\u0438 \u0432 \u0431\u043b\u043e\u043a \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 <code>when<\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442, \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u043e \u043b\u0438 \u043a\u043b\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 git. \u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0437\u0430\u0434\u0430\u0447\u0443 <code>Clone git repository<\/code> \u00a0\u0438\u0437 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e \u0431\u043b\u043e\u043a\u0430 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443 \u0438 \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0437\u0430\u0434\u0430\u0447\u0438. \u041f\u043e\u043c\u043d\u0438\u0442\u0435, \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0437\u0430\u0434\u0430\u0447\u0438 \u043e\u0442 \u0438\u043c\u0435\u043d\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f <code>www-data<\/code> \u00a0\u0432 \u0441\u0442\u0440\u043e\u043a\u0438 10-17. \u041a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u043c\u044b \u043f\u0435\u0440\u0435\u043c\u0435\u0441\u0442\u0438\u043c \u044d\u0442\u0443 \u0437\u0430\u0434\u0430\u0447\u0443, \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043e\u0441\u0442\u0430\u0432\u0448\u0438\u0439\u0441\u044f \u0431\u043b\u043e\u043a, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0432\u044b\u0432\u043e\u0434 \u043d\u0430 \u043f\u0440\u0435\u0434\u043c\u0435\u0442 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u043d\u043e\u0433\u043e \u0441\u0442\u0430\u0442\u0443\u0441\u0430 \u0432 \u0441\u0442\u0440\u043e\u043a\u0435 56.<\/p>\n<pre><code>--- - name: create \/var\/www\/ directory   file:      dest: \/var\/www\/     state: directory     owner: www-data     group: www-data     mode: 0700  - name: Clone git repository   git:     dest: \/var\/www\/laravel     repo: https:\/\/github.com\/JeffreyWay\/Laravel-From-Scratch-Blog-Project.git     update: no   register: repo   become: true   become_user: www-data  name: configure site - block:   - name: set .env file     template:       src: env.j2       dest: \/var\/www\/laravel\/.env    - name: set database.php conf file     copy:       src: database.php       dest: \/var\/www\/laravel\/config\/database.php       mode: u+rw,g-rw,o-r    - name: Composer update     command:       cmd: composer update       chdir: \/var\/www\/laravel    - name: composer install     command:       cmd: composer install       chdir: \/var\/www\/laravel    - name: php artisan steps     command:       cmd: php artisan {{ item }}       chdir: \/var\/www\/laravel     with_items:       - migrate --seed --force       - storage:link       - config:clear       - key:generate --force   become: true   become_user: www-data   notify:       - restart php8.1-fpm       - restart nginx   when: repo is changed<\/code><\/pre>\n<p>\u041a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u043c\u044b \u0432\u043d\u0435\u0441\u0435\u043c \u044d\u0442\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f, \u043c\u044b \u0441\u043c\u043e\u0436\u0435\u043c \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0442\u0435\u0441\u0442 \u043d\u0430 \u0438\u0434\u0435\u043c\u043f\u043e\u0442\u0435\u043d\u0442\u043d\u043e\u0441\u0442\u044c. \u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 <code>molecule idempotence<\/code> \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0447\u0442\u043e \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c. \u0415\u0441\u043b\u0438 \u0432\u0435\u0441\u044c \u043d\u0430\u0448 \u043a\u043e\u0434 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e, \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0432\u044b\u0432\u043e\u0434:<\/p>\n<pre><code>PLAY RECAP ********************************************************************* site                       : ok=13   changed=0    unreachable=0    failed=0    skipped=10   rescued=0    ignored=0 INFO     Idempotence completed successfully<\/code><\/pre>\n<p>\u041e\u0442\u043b\u0438\u0447\u043d\u043e, \u043c\u044b \u043d\u0430 \u043e\u0434\u0438\u043d \u0448\u0430\u0433 \u043f\u0440\u0438\u0431\u043b\u0438\u0437\u0438\u043b\u0438\u0441\u044c \u043a \u0442\u043e\u0447\u043d\u043e\u043c\u0443 \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u043d\u0430\u0431\u043e\u0440\u0443 \u0442\u0435\u0441\u0442\u043e\u0432 Molecule.  <\/p>\n<h2>\u041b\u0438\u043d\u0442\u0438\u043d\u0433<\/h2>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u0443\u0436\u0435 \u0437\u043d\u0430\u0435\u043c, \u0447\u0442\u043e \u043d\u0430\u0448 \u043a\u043e\u0434 Ansible \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0435\u043d \u0438 \u0438\u0434\u0435\u043c\u043f\u043e\u0442\u0435\u043d\u0442\u0435\u043d, \u043d\u043e \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043b\u0438 \u043e\u043d \u0447\u0438\u0441\u0442\u044b\u043c \u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430\u043c? \u0427\u0442\u043e\u0431\u044b \u0432\u044b\u044f\u0441\u043d\u0438\u0442\u044c \u044d\u0442\u043e, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043d\u0430\u0448 \u043a\u043e\u0434 \u0447\u0435\u0440\u0435\u0437 \u043b\u0438\u043d\u0442\u0435\u0440. \u0427\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043b\u0438\u043d\u0442\u0438\u043d\u0433 \u0432 Molecule, \u0432\u0430\u043c \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0443\u0436\u043d\u043e \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0435\u0433\u043e \u0432 \u0433\u043b\u0430\u0432\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435. \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e, \u0434\u043e\u0431\u0430\u0432\u0438\u0432 \u0431\u043b\u043e\u043a <code>lint:<\/code> \u0432 \u043a\u043e\u043d\u0435\u0446 <code>molecule.yml<\/code> \u043f\u043e\u0434 \u0431\u043b\u043e\u043a <code>verifier:<\/code><\/p>\n<pre><code>.. verifier:   name: testinfra lint: |   set -e   yamllint .   ansible-lint<\/code><\/pre>\n<p>\u0412\u044b \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u0435, \u0447\u0442\u043e \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u0437\u0434\u0435\u0441\u044c \u0434\u0432\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u043b\u0438\u043d\u0442\u0435\u0440\u0430 yamllint \u0438 ansible-lint. yamllint \u0444\u043e\u043a\u0443\u0441\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043d\u0430 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0435 YAML \u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u043c\u0435\u0442\u043e\u0434\u0430\u0445, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0441 YAML, \u0432 \u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u0430\u043a ansible-lint \u0444\u043e\u043a\u0443\u0441\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043d\u0430 \u043a\u043e\u0434\u0435 \u0438 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0438, \u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 Ansible. \u0415\u0441\u0442\u044c \u0442\u0440\u0435\u0442\u0438\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f \u0431\u044b \u043f\u043e\u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u043e\u0432\u0430\u043b, \u0435\u0441\u043b\u0438 \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 testinfra, flake8, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u0432\u0430\u0448\u0438 \u0442\u0435\u0441\u0442\u044b \u043d\u0430 Python \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430\u043c\u0438.<\/p>\n<p>\u041a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u0431\u043b\u043e\u043a <code>lint:<\/code>, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c <code>molecule lint<\/code> \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u0433\u0434\u0435 \u043c\u044b \u043c\u043e\u0433\u043b\u0438 \u0431\u044b \u0437\u0430\u0445\u043e\u0442\u0435\u0442\u044c \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u043d\u0430\u0448 \u043a\u043e\u0434.<\/p>\n<pre><code>INFO     Running default > lint WARNING  Listing 30 violation(s) that are fatal fqcn-builtins: Use FQCN for builtin actions. handlers\/main.yml:3 Task\/Handler: restart php8.1-fpm fqcn-builtins: Use FQCN for builtin actions. handlers\/main.yml:11 Task\/Handler: restart nginx meta-incorrect: Should change default metadata: company meta\/main.yml:1 meta-incorrect: Should change default metadata: license meta\/main.yml:1 fqcn-builtins: Use FQCN for builtin actions. molecule\/default\/converge.yml:13 Task\/Handler: Setup MySQL DB fqcn-builtins: Use FQCN for builtin actions. molecule\/default\/converge.yml:21 Task\/Handler: Include laravel_role fqcn-builtins: Use FQCN for builtin actions. tasks\/deploy_site.yml:2 Task\/Handler: create \/var\/www\/ directory fqcn-builtins: Use FQCN for builtin actions. tasks\/deploy_site.yml:10 Task\/Handler: Clone git repository git-latest: Git checkouts must contain explicit version. tasks\/deploy_site.yml:10 Task\/Handler: Clone git repository no-handler: Tasks that run when changed should likely be handlers. tasks\/deploy_site.yml:19 Task\/Handler: Configure the site then migrate and seed the database fqcn-builtins: Use FQCN for builtin actions. tasks\/deploy_site.yml:21 Task\/Handler: set .env file risky-file-permissions: File permissions unset or incorrect. tasks\/deploy_site.yml:21 Task\/Handler: set .env file fqcn-builtins: Use FQCN for builtin actions. tasks\/deploy_site.yml:26 Task\/Handler: set database.php conf file fqcn-builtins: Use FQCN for builtin actions. tasks\/deploy_site.yml:32 Task\/Handler: Composer update no-changed-when: Commands should not change things if nothing needs doing. tasks\/deploy_site.yml:32 Task\/Handler: Composer update fqcn-builtins: Use FQCN for builtin actions. tasks\/deploy_site.yml:37 Task\/Handler: composer install no-changed-when: Commands should not change things if nothing needs doing. tasks\/deploy_site.yml:37 Task\/Handler: composer install fqcn-builtins: Use FQCN for builtin actions. tasks\/deploy_site.yml:42 Task\/Handler: php artisan steps no-changed-when: Commands should not change things if nothing needs doing. tasks\/deploy_site.yml:42 Task\/Handler: php artisan steps fqcn-builtins: Use FQCN for builtin actions. tasks\/nginx_install.yml:7 Task\/Handler: install nginx fqcn-builtins: Use FQCN for builtin actions. tasks\/nginx_install.yml:15 Task\/Handler: Make sure a service unit is running fqcn-builtins: Use FQCN for builtin actions. tasks\/nginx_install.yml:21 Task\/Handler: copy over config fqcn-builtins: Use FQCN for builtin actions. tasks\/php_install.yml:6 Task\/Handler: install php and related packages fqcn-builtins: Use FQCN for builtin actions. tasks\/php_install.yml:11 Task\/Handler: Checks if Composer is already installed fqcn-builtins: Use FQCN for builtin actions. tasks\/php_install.yml:20 Task\/Handler: Download Composer Installation Script (if not already installed) risky-file-permissions: File permissions unset or incorrect. tasks\/php_install.yml:20 Task\/Handler: Download Composer Installation Script (if not already installed) fqcn-builtins: Use FQCN for builtin actions. tasks\/php_install.yml:25 Task\/Handler: Run Composer Installer (if not already installed) fqcn-builtins: Use FQCN for builtin actions. tasks\/php_install.yml:30 Task\/Handler: Copy Composer Executable to \/usr\/local\/bin fqcn-builtins: Use FQCN for builtin actions. tasks\/php_install.yml:38 Task\/Handler: Remove phar fqcn-builtins: Use FQCN for builtin actions. tasks\/php_install.yml:43 Task\/Handler: Remove Install Script You can skip specific rules or tags by adding them to your configuration file: # .config\/ansible-lint.yml warn_list:  # or 'skip_list' to silence them completely   - experimental  # all rules tagged as experimental   - fqcn-builtins  # Use FQCN for builtin actions.   - git-latest  # Git checkouts must contain explicit version.   - meta-incorrect  # meta\/main.yml default values should be changed.   - no-changed-when  # Commands should not change things if nothing needs doing.   - no-handler  # Tasks that run when changed should likely be handlers. Finished with 29 failure(s), 2 warning(s) on 26 files. WARNING  Retrying execution failure 2 of: s e t   - e   y a m l l i n t   .   a n s i b l e - l i n t CRITICAL Lint failed with error code 2<\/code><\/pre>\n<p>\u041e\u0433\u043e, \u0434\u0430 \u0437\u0434\u0435\u0441\u044c \u043c\u0430\u0441\u0441\u0430 \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0443\u0436\u043d\u043e \u0440\u0435\u0448\u0438\u0442\u044c. \u0421 \u0447\u0435\u0433\u043e \u043d\u0430\u043c \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043d\u0430\u0447\u0430\u0442\u044c? \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043d\u0430\u0447\u043d\u0435\u043c \u0441 \u0442\u043e\u0433\u043e, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u043c\u0435\u0435\u0442 21 \u0441\u043b\u0443\u0447\u0430\u0439, <code>fqcn-builtins: Use FQCN for builtin actions<\/code>. \u042d\u0442\u0430 \u043e\u0448\u0438\u0431\u043a\u0430 \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u043c\u044b \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043f\u043e\u043b\u043d\u043e\u0435 \u0438\u043c\u044f \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438 (FQCN) \u0434\u043b\u044f \u043c\u043d\u043e\u0433\u0438\u0445 \u043d\u0430\u0448\u0438\u0445 \u0437\u0430\u0434\u0430\u0447 Ansible. \u041d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0432\u0441\u0435 \u0437\u0430\u0442\u0440\u043e\u043d\u0443\u0442\u044b\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u0434\u043e <code>ansible.builtin.&lt;MODULE_NAME><\/code>. \u0427\u0442\u043e\u0431\u044b \u0432\u0441\u0435 \u0431\u044b\u043b\u043e \u043f\u0440\u043e\u0449\u0435, \u044f \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e \u043e\u0448\u0438\u0431\u043a\u0443 \u0438 \u0442\u043e, \u043a\u0430\u043a \u0434\u043e\u043b\u0436\u0435\u043d \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0437\u0430\u0434\u0430\u0447\u0438.\u00a0<\/p>\n<pre><code>handlers\/main.yml:3 Task\/Handler: restart php8.1-fpm ansible.builtin.sysvinit:  handlers\/main.yml:11 Task\/Handler: restart nginx ansible.builtin.sysvinit:  molecule\/default\/converge.yml:13 Task\/Handler: Setup MySQL DB ansible.builtin.include_role:  molecule\/default\/converge.yml:21 Task\/Handler: Include laravel_role ansible.builtin.include_role:  tasks\/deploy_site.yml:2 Task\/Handler: create \/var\/www\/ directory ansible.builtin.file:  tasks\/deploy_site.yml:10 Task\/Handler: Clone git repository ansible.builtin.git:  tasks\/deploy_site.yml:21 Task\/Handler: set .env file ansible.builtin.template:  tasks\/deploy_site.yml:26 Task\/Handler: set database.php conf file ansible.builtin.copy:  tasks\/deploy_site.yml:32 Task\/Handler: Composer update ansible.builtin.shell:  tasks\/deploy_site.yml:37 Task\/Handler: composer install ansible.builtin.shell:  tasks\/deploy_site.yml:42 Task\/Handler: php artisan steps ansible.builtin.shell:  tasks\/nginx_install.yml:7 Task\/Handler: install nginx ansible.builtin.apt:  tasks\/nginx_install.yml:15 Task\/Handler: Make sure a service unit is running ansible.builtin.sysvinit:  tasks\/nginx_install.yml:21 Task\/Handler: copy over config ansible.builtin.copy:  tasks\/php_install.yml:6 Task\/Handler: install php and related packages ansible.builtin.apt:  tasks\/php_install.yml:11 Task\/Handler: Checks if Composer is already installed ansible.builtin.command:  tasks\/php_install.yml:20 Task\/Handler: Download Composer Installation Script (if not already installed) ansible.builtin.get_url:  tasks\/php_install.yml:25 Task\/Handler: Run Composer Installer (if not already installed) ansible.builtin.command:  tasks\/php_install.yml:30 Task\/Handler: Copy Composer Executable to \/usr\/local\/bin ansible.builtin.copy:  tasks\/php_install.yml:38 Task\/Handler: Remove phar ansible.builtin.file:  tasks\/php_install.yml:43 Task\/Handler: Remove Install Script ansible.builtin.file:<\/code><\/pre>\n<p>\u0410 \u0442\u0435\u043f\u0435\u0440\u044c, \u043a\u043e\u0433\u0434\u0430 \u043e\u043d\u0438 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u044b, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c.<\/p>\n<pre><code>INFO     Running default > lint WARNING  Listing 12 violation(s) that are fatal meta-incorrect: Should change default metadata: company meta\/main.yml:1 meta-incorrect: Should change default metadata: license meta\/main.yml:1 git-latest: Git checkouts must contain explicit version. tasks\/deploy_site.yml:10 Task\/Handler: Clone git repository no-handler: Tasks that run when changed should likely be handlers. tasks\/deploy_site.yml:19 Task\/Handler: Configure the site then migrate and seed the database risky-file-permissions: File permissions unset or incorrect. tasks\/deploy_site.yml:21 Task\/Handler: set .env file no-changed-when: Commands should not change things if nothing needs doing. tasks\/deploy_site.yml:32 Task\/Handler: Composer update no-changed-when: Commands should not change things if nothing needs doing. tasks\/deploy_site.yml:37 Task\/Handler: composer install no-changed-when: Commands should not change things if nothing needs doing. tasks\/deploy_site.yml:42 Task\/Handler: php artisan steps risky-file-permissions: File permissions unset or incorrect. tasks\/php_install.yml:20 Task\/Handler: Download Composer Installation Script (if not already installed) <\/code><\/pre>\n<p>\u0418\u0437 \u043e\u0441\u0442\u0430\u0432\u0448\u0438\u0445\u0441\u044f \u043e\u0448\u0438\u0431\u043e\u043a \u0435\u0441\u0442\u044c \u0434\u0432\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c: <code>meta-incorrect<\/code>, \u0447\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0444\u0430\u0439\u043b \u0432 \u043d\u0430\u0448\u0435\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 <code>.\/meta<\/code> \u043f\u043e-\u043f\u0440\u0435\u0436\u043d\u0435\u043c\u0443 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u0438 <code>no-changed-when<\/code> , \u0447\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u043d\u0435 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0438\u0434\u0435\u043c\u043f\u043e\u0442\u0435\u043d\u0442\u043d\u044b\u043c\u0438. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043d\u0430\u0441 \u043d\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442 \u043c\u0435\u0442\u0430\u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0438 \u0442\u0435\u0441\u0442\u044b \u043d\u0430 \u0438\u0434\u0435\u043c\u043f\u043e\u0442\u0435\u043d\u0442\u043d\u043e\u0441\u0442\u044c, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0438\u0445 \u043e\u0431\u0430. \u0422\u0430\u043a \u043a\u0430\u043a \u0436\u0435 \u043d\u0430\u043c \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u044d\u0442\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438? \u041f\u0443\u0442\u0435\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u0430 <code>.ansible-lint<\/code> \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 Molecule.<\/p>\n<pre><code>skip_list:  # or 'skip_list' to silence them completely   - meta-incorrect  # meta\/main.yml default values should be changed.   - no-changed-when # Commands should not change things if nothing needs doing.<\/code><\/pre>\n<p>\u0421\u0434\u0435\u043b\u0430\u0432 \u044d\u0442\u043e, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u043d\u043e\u0432\u0430 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c <code>molecule lint<\/code> \u0438 \u0443\u0432\u0438\u0434\u0435\u0442\u044c, \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0432\u0441\u0435\u0433\u043e 4 \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u044f.  <\/p>\n<pre><code>INFO     Running default > lint WARNING  Listing 4 violation(s) that are fatal git-latest: Git checkouts must contain explicit version. tasks\/deploy_site.yml:10 Task\/Handler: Clone git repository no-handler: Tasks that run when changed should likely be handlers. tasks\/deploy_site.yml:19 Task\/Handler: Configure the site then migrate and seed the database risky-file-permissions: File permissions unset or incorrect. tasks\/deploy_site.yml:21 Task\/Handler: set .env file risky-file-permissions: File permissions unset or incorrect. tasks\/php_install.yml:20 Task\/Handler: Download Composer Installation Script (if not already installed) Finished with 2 failure(s), 2 warning(s) on 26 files. <\/code><\/pre>\n<p>\u041f\u0435\u0440\u0432\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430 <code>git-latest<\/code>. \u042d\u0442\u043e \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043d\u0430\u043c, \u0447\u0442\u043e \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u0442\u044c \u0432\u0435\u0440\u0441\u0438\u044e \u043a \u043d\u0430\u0448\u0435\u0439 \u0437\u0430\u0434\u0430\u0447\u0435 git \u0432\u043c\u0435\u0441\u0442\u043e \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0442\u044c \u043e\u0441\u043d\u043e\u0432\u043d\u0443\u044e \u0432\u0435\u0442\u0432\u044c. \u0418\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u044d\u0442\u043e \u0442\u0430\u043a \u0436\u0435 \u043f\u0440\u043e\u0441\u0442\u043e, \u043a\u0430\u043a \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043a \u0437\u0430\u0434\u0430\u0447\u0435 \u043e\u0434\u043d\u043e\u0441\u0442\u0440\u043e\u0447\u043d\u0443\u044e <code>version: main<\/code>  .<\/p>\n<pre><code>- name: Clone git repository   ansible.builtin.git:     dest: \/var\/www\/laravel     repo: https:\/\/github.com\/JeffreyWay\/Laravel-From-Scratch-Blog-Project.git     update: no     version: main   become: true   become_user: www-data   notify:     - configure site     - restart php8.1-fpm     - restart nginx<\/code><\/pre>\n<p>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u0435 <code>no-handler<\/code>. \u042d\u0442\u0430 \u043e\u0448\u0438\u0431\u043a\u0430 \u0434\u0430\u0435\u0442 \u043d\u0430\u043c \u0437\u043d\u0430\u0442\u044c, \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0437\u0430\u0434\u0430\u0447\u0430 \u0438\u043b\u0438 \u0441\u0435\u0440\u0438\u044f \u0437\u0430\u0434\u0430\u0447, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438. \u041c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447. \u0418\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u044f \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0440\u044f\u0434\u0430 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u0431\u043b\u043e\u043a\u0430 \u0437\u0430\u0434\u0430\u0447 <code>configure site<\/code> \u0438\u0437 <code>deploy_sites.yml<\/code> \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0444\u0430\u0439\u043b. \u042f \u043d\u0430\u0447\u0430\u043b \u0441 <code>tasks\/configure_site.yml<\/code>.<\/p>\n<pre><code>- name: configure site   block:   - name: set .env file     ansible.builtin.template:       src: env.j2       dest: \/var\/www\/laravel\/.env       mode: '0755'    - name: set database.php conf file     ansible.builtin.copy:       src: database.php       dest: \/var\/www\/laravel\/config\/database.php       mode: u+rw,g-rw,o-r    - name: Composer update     ansible.builtin.command:       cmd: composer update       chdir: \/var\/www\/laravel    - name: composer install     ansible.builtin.command:       cmd: composer install       chdir: \/var\/www\/laravel    - name: php artisan steps     ansible.builtin.command:       cmd: php artisan {{ item }}       chdir: \/var\/www\/laravel     with_items:       - migrate --seed --force       - storage:link       - config:clear       - key:generate --force   become: true   become_user: www-data<\/code><\/pre>\n<p>\u0417\u0430\u0442\u0435\u043c \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0432\u043d\u0435\u0441\u0442\u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0432 \u0437\u0430\u0434\u0430\u0447\u0443 git, \u0434\u043e\u0431\u0430\u0432\u0438\u0432 \u0434\u0440\u0443\u0433\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a.<\/p>\n<pre><code> notify:     - configure site     - restart php8.1-fpm     - restart nginx<\/code><\/pre>\n<p>\u041d\u0430\u043a\u043e\u043d\u0435\u0446, \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c <code>handlers\/main.yml<\/code> \u0434\u043b\u044f \u0432\u044b\u0437\u043e\u0432\u0430 <code>tasks\/configure_site.yml<\/code>, \u0447\u0442\u043e\u0431\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0438 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0438 <code>notify<\/code>.<\/p>\n<pre><code>--- # handlers file for laravel_role - name: configure site   include_tasks: tasks\/configure_site.yml  - name: restart php8.1-fpm   ansible.builtin.sysvinit:      name: php8.1-fpm     state: \"{{ item }}\"   with_items:     - stopped     - started  - name: restart nginx   ansible.builtin.sysvinit:     name: nginx     state: restarted<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u0448\u0438 \u0437\u0430\u0434\u0430\u0447\u0438 \u043f\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 \u043d\u0430\u0448\u0435\u0433\u043e \u0441\u0430\u0439\u0442\u0430 \u0438 \u043d\u0430\u0448\u0435\u0439 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0431\u0443\u0434\u0443\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u043e\u0433\u0434\u0430, \u043a\u043e\u0433\u0434\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 git \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435.<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u0435 <code>lint <\/code> \u044d\u0442\u043e <code>risky-file-permissions<\/code>\u00a0 \u0434\u043b\u044f \u0434\u0432\u0443\u0445 \u0444\u0430\u0439\u043b\u043e\u0432. \u0412\u043a\u0440\u0430\u0442\u0446\u0435, \u043c\u044b \u043d\u0435 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u043b\u0438 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0444\u0430\u0439\u043b\u043e\u0432, \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c\u044b\u0445 Ansible, \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044f \u043c\u0435\u0441\u0442\u043e \u0434\u043b\u044f \u0447\u0440\u0435\u0437\u043c\u0435\u0440\u043d\u043e \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u044e\u0449\u0438\u0445 \u0438\u043b\u0438 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u0444\u0430\u0439\u043b\u043e\u0432. \u042d\u0442\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043b\u0435\u0433\u043a\u043e \u0443\u0441\u0442\u0440\u0430\u043d\u0438\u0442\u044c, \u0434\u043e\u0431\u0430\u0432\u0438\u0432 \u043e\u043f\u0446\u0438\u044e <code>mode: &lt;PERMISSIONS><\/code> \u043a \u0444\u0430\u0439\u043b\u0430\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c.<\/p>\n<pre><code>tasks\/configure_site.yml - name: set .env file   ansible.builtin.template:     src: env.j2     dest: \/var\/www\/laravel\/.env     mode: '0755'  tasks\/php_install.yml - name: Download Composer Installation Script (if not already installed)   ansible.builtin.get_url:     url: https:\/\/getcomposer.org\/installer     dest: \/tmp\/composer-setup.php     mode: '0755'<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043c\u044b \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043c \u0432\u043d\u043e\u0441\u0438\u0442\u044c \u044d\u0442\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c <code>molecule lint<\/code> \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0440\u0430\u0437 \u0438 \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u043e\u043d \u043d\u0435 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u0439.<\/p>\n<p><strong>\u041f\u043e\u0434\u0432\u043e\u0434\u044f \u0438\u0442\u043e\u0433\u0438<\/strong><\/p>\n<p>\u041a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f \u0441\u0435\u043a\u0446\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0430, \u043c\u044b \u0441\u043c\u043e\u0436\u0435\u043c \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0432\u0441\u0435 \u044d\u0442\u043e \u0432\u043c\u0435\u0441\u0442\u0435 \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c <code>molecule test<\/code>, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0439 \u043d\u0430\u043c \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0432\u0441\u0435 \u044d\u0442\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0437\u0430 \u043e\u0434\u0438\u043d \u043f\u0440\u043e\u0433\u043e\u043d.<\/p>\n<p>\u041d\u0430\u0448\u0430 \u0440\u043e\u043b\u044c Ansible \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 \u0432\u0430\u0448\u0435\u0439 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445, \u0430 \u043c\u044b \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u043b\u0438 \u0435\u0435 \u0438\u0434\u0435\u043c\u043f\u043e\u0442\u0435\u043d\u0442\u043d\u043e\u0441\u0442\u044c \u0438 \u043f\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438 \u043d\u0430\u0434 \u0442\u0435\u043c, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u043b\u0430 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430\u043c \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u0422\u0435\u043f\u0435\u0440\u044c \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0434\u0432\u0438\u0433\u0430\u0442\u044c\u0441\u044f \u0434\u0430\u043b\u044c\u0448\u0435 \u0441\u043e \u0437\u043d\u0430\u043d\u0438\u0435\u043c \u0438 \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u043e\u0441\u0442\u044c\u044e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0432\u0430\u0448\u0438 \u0440\u043e\u043b\u0438 \u0432 Ansible \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0431\u043e\u0447\u0438\u043c\u0438 \u0438 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u044b\u043c\u0438.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/a7f\/b22\/65d\/a7fb2265dbab30ef3c9df8100ba62b37.jpg\" width=\"780\" height=\"100\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a7f\/b22\/65d\/a7fb2265dbab30ef3c9df8100ba62b37.jpg\" data-blurred=\"true\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041f\u043e\u0442\u043e\u043a\u00a0<a href=\"https:\/\/slurm.io\/ansible?utm_source=habr&amp;utm_medium=article&amp;utm_campaign=ansible&amp;utm_content=article_26-01-2023&amp;utm_term=annavanna\"><u>\u00abAnsible: Infrastructure as Code\u00bb<\/u><\/a>\u00a0<strong>\u0441\u0442\u0430\u0440\u0442\u0443\u0435\u0442 6<\/strong>\u00a0<strong>\u0444\u0435\u0432\u0440\u0430\u043b\u044f.<\/strong>  <\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p> <!----> <!----><\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/company\/southbridge\/blog\/713060\/\"> https:\/\/habr.com\/ru\/company\/southbridge\/blog\/713060\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0411\u043e\u043b\u044c\u0448\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0439\u0442\u0435 \u0441 Molecule, \u0447\u0442\u043e\u0431\u044b \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0432\u0430\u0448\u0430 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u043e\u0432\u043a\u0443, \u0438\u0434\u0435\u043c\u043f\u043e\u0442\u0435\u043d\u0442\u043d\u043e\u0441\u0442\u044c, \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 \u0438 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0438 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0438 \u0432\u0435\u0431-\u0441\u0430\u0439\u0442\u0430 \u0432\u0430\u0448\u0438 \u0440\u043e\u043b\u0438 Ansible \u0432\u0435\u043b\u0438 \u0441\u0435\u0431\u044f \u0434\u043e\u043b\u0436\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c.  <\/p>\n<p>\u0412 <a href=\"https:\/\/habr.com\/ru\/company\/southbridge\/blog\/711432\/\">\u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0441\u0442\u0430\u0442\u044c\u0438<\/a> \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0438 \u043e\u0441\u043d\u043e\u0432\u044b \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 Molecule \u0438 \u043f\u0440\u043e\u0432\u0435\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0442\u0435\u0441\u0442\u043e\u0432. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0443\u0433\u043b\u0443\u0431\u0438\u043c\u0441\u044f \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e Molecule \u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u043d\u0430 \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c.<\/p>\n<p>\u041c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0437\u0430\u043f\u0443\u0441\u043a \u0434\u0432\u0443\u0445 \u0440\u0430\u0437\u043d\u044b\u0445 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432, \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0438\u0434\u0435\u043c\u043f\u043e\u0442\u0435\u043d\u0442\u043d\u043e\u0441\u0442\u0438 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e linting. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0439\u0442\u0438 \u043a\u043e\u0434 Ansible, \u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u044b \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u043c, \u043d\u0430 Github. \u041d\u0435 \u0441\u0442\u0435\u0441\u043d\u044f\u0439\u0442\u0435\u0441\u044c \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0434\u0430\u043b\u044c\u0448\u0435 \u043d\u0430 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u0437\u0434\u0435\u0441\u044c \u2014   <a href=\"https:\/\/github.com\/PCritchfield\/ansible\/tree\/master\/ansible_molecule_pt2\/laravel_website_corrected\/laravel_role\"><u>https:\/\/github.com\/PCritchfield\/ansible\/tree\/master\/ansible_molecule_pt2\/laravel_website_corrected\/laravel_role<\/u><\/a>.<\/p>\n<h2>\u0420\u043e\u043b\u044c<\/h2>\n<p>\u0420\u043e\u043b\u044c, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u0435\u0442 \u043e\u0442\u0440\u0430\u0436\u0430\u0442\u044c \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439. \u041e\u0434\u043d\u0430\u043a\u043e \u043e\u043d \u043d\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043a\u0430\u043a \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u043a \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044e. \u0421 \u0443\u0447\u0435\u0442\u043e\u043c \u0441\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0433\u043e, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0447\u0442\u043e \u043e\u043d \u0434\u0435\u043b\u0430\u0435\u0442.<\/p>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u044d\u0442\u043e\u0439 \u0440\u043e\u043b\u0438 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0438 \u0432\u0435\u0431-\u0441\u0430\u0439\u0442\u0430 Laravel. \u041e\u043d \u0443\u0447\u0430\u0441\u0442\u0432\u0443\u0435\u0442 \u0432 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 Nginx, PHP 8.1 (\u0438 \u043f\u0430\u043a\u0435\u0442\u043e\u0432), \u0430 \u0442\u0430\u043a\u0436\u0435 Composer; \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0440\u043e\u043b\u0438 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u043d \u0441\u0430\u0439\u0442 Laravel. \u041d\u0430\u043a\u043e\u043d\u0435\u0446, \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Molecule \u0434\u043b\u044f \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432, \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445, \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u044f \u0438\u0434\u0435\u043c\u043f\u043e\u0442\u0435\u043d\u0442\u043d\u043e\u0441\u0442\u0438 \u0438 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u0434\u0430 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430\u043c \u043a\u043e\u043c\u043f\u043e\u043d\u043e\u0432\u043a\u0438.<\/p>\n<pre><code>. \u251c\u2500\u2500 README.md \u251c\u2500\u2500 defaults \u2502   \u2514\u2500\u2500 main.yml \u251c\u2500\u2500 files \u2502   \u251c\u2500\u2500 database.php \u2502   \u2514\u2500\u2500 laravel.conf \u251c\u2500\u2500 handlers \u2502   \u2514\u2500\u2500 main.yml \u251c\u2500\u2500 meta \u2502   \u2514\u2500\u2500 main.yml \u251c\u2500\u2500 molecule \u2502   \u251c\u2500\u2500 collections.yml \u2502   \u251c\u2500\u2500 default \u2502   \u2502   \u251c\u2500\u2500 converge.yml \u2502   \u2502   \u251c\u2500\u2500 molecule.yml \u2502   \u2502   \u2514\u2500\u2500 tests \u2502   \u2502       \u251c\u2500\u2500 conftest.py \u2502   \u2502       \u2514\u2500\u2500 test_default.py \u2502   \u2514\u2500\u2500 requirements.yml \u251c\u2500\u2500 tasks \u2502   \u251c\u2500\u2500 deploy_site.yml \u2502   \u251c\u2500\u2500 main.yml \u2502   \u251c\u2500\u2500 nginx_install.yml \u2502   \u2514\u2500\u2500 php_install.yml \u251c\u2500\u2500 templates \u2502   \u2514\u2500\u2500 env.j2 \u251c\u2500\u2500 tests \u2502   \u251c\u2500\u2500 inventory \u2502   \u2514\u2500\u2500 test.yml \u2514\u2500\u2500 vars     \u2514\u2500\u2500 main.yml<\/code><\/pre>\n<h2>\u0417\u0430\u0434\u0430\u0447\u0430<\/h2>\n<p>\u041c\u043e\u0436\u043d\u043e \u043d\u0430\u0447\u0430\u0442\u044c \u0441 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0441 \u0437\u0430\u0434\u0430\u0447\u0430\u043c\u0438: <\/p>\n<pre><code>--- - name: Include Nginx install   include_tasks: nginx_install.yml  - name: Install php   include_tasks: php_install.yml  - name: Deploy website   include_tasks: deploy_site.yml<\/code><\/pre>\n<p>\u041e\u0442\u0441\u044e\u0434\u0430 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u0434\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u0432\u0435\u0431-\u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 (Nginx \u0438 PHP) \u0438 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u0432\u0435\u0431-\u0441\u0430\u0439\u0442\u0430 Laravel.<\/p>\n<p>\u0417\u0430\u0434\u0430\u0447\u0438 \u043f\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 Nginx \u043f\u0440\u043e\u0441\u0442\u044b: \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u0435 apt cache, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u043f\u0430\u043a\u0435\u0442\u044b, \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u0441\u043b\u0443\u0436\u0431\u0443 \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e. \u0417\u0434\u0435\u0441\u044c \u0432\u0430\u0436\u043d\u043e \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443 5 cache_valid_time: 3600. \u042d\u0442\u043e\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0433\u043e\u0432\u043e\u0440\u0438\u0442 Ansible \u043d\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c apt update, \u0435\u0441\u043b\u0438 \u043a\u044d\u0448 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d \u043c\u0435\u043d\u0435\u0435 3600 \u0441\u0435\u043a\u0443\u043d\u0434 \u043d\u0430\u0437\u0430\u0434, \u0447\u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u0434\u0435\u043c\u043f\u043e\u0442\u0435\u043d\u0442\u043d\u043e\u0441\u0442\u0438. \u042d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b \u0437\u0430\u0434\u0430\u0447\u0438 \u0442\u0430\u043a\u0436\u0435 \u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 Nginx \u0434\u043b\u044f \u0432\u0435\u0431-\u0441\u0430\u0439\u0442\u0430.<\/p>\n<pre><code>--- - name: Only run \"update_cache=yes\" if the last one is more than 3600 seconds ago   ansible.builtin.apt:     update_cache: yes     cache_valid_time: 3600  - name: install nginx   apt:     name: \"{{ item }}\"     state: present   with_items:     - nginx=1.18.*     - git  - name: Make sure a service unit is running   sysvinit:     state: started     name: nginx     enabled: true  - name: copy over config   copy:     src: laravel.conf     dest: \/etc\/nginx\/sites-available\/default     mode: u+rw,g-r,o-r<\/code><\/pre>\n<p><em>tasks\/nginx_install.yml<\/em><\/p>\n<pre><code>server {         listen 80 default_server;         listen [::]:80 default_server;          index index.php;         error_log  \/var\/log\/nginx\/error.log;         access_log \/var\/log\/nginx\/access.log;         root \/var\/www\/laravel\/public;         location ~ \\.php$ {             try_files $uri =404;             fastcgi_split_path_info ^(.+\\.php)(\/.+)$;             fastcgi_pass unix:\/run\/php\/php8.1-fpm.sock;             fastcgi_index index.php;             include fastcgi_params;             fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;             fastcgi_param PATH_INFO $fastcgi_path_info;         }         location \/ {            try_files $uri $uri\/ \/index.php?$query_string;         }  }<\/code><\/pre>\n<p><em>file\/laravel.conf<\/em><\/p>\n<p>\u0417\u0430\u0434\u0430\u0447\u0438 \u0432 php_install.yml \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u044f\u0442 PHP 8.1 \u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u043f\u0430\u043a\u0435\u0442\u044b, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0434\u043b\u044f \u0432\u0435\u0431-\u0441\u0430\u0439\u0442\u0430. \u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 PHP \u043c\u044b \u0442\u0430\u043a\u0436\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043c Composer. \u0421\u043f\u0438\u0441\u043e\u043a \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u0438 composer_path \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u0441\u043f\u0438\u0441\u043a\u0435 \u0432 <code>defaults\/main.yml<\/code>.  <\/p>\n<pre><code>- name: Only run \"update_cache=yes\" if the last one is more than 3600 seconds ago   ansible.builtin.apt:     update_cache: yes     cache_valid_time: 3600  - name: install php packages   apt:     name: \"{{ php_pkgs }}\"     state: present  - name: Checks if Composer is already installed   command: \"{{ composer_path }}\"   ignore_errors: true   register: composer_installed  - name: Install Composer if its not already installed   block:      - name: Download Composer Installation Script (if not already installed)       get_url:         url: https:\/\/getcomposer.org\/installer         dest: \/tmp\/composer-setup.php      - name: Run Composer Installer (if not already installed)       command:         cmd: \/usr\/bin\/php \/tmp\/composer-setup.php         creates: composer.phar      - name: Copy Composer Executable to \/usr\/local\/bin       become: true       copy:         src: composer.phar         dest: \/usr\/local\/bin\/composer         remote_src: yes         mode: '0755'      - name: Remove phar       file:         path: composer.phar         state: absent      - name: Remove Install Script       file:         path: \/tmp\/composer-setup.php         state: absent    when: composer_installed is failed<\/code><\/pre>\n<p><em>tasks\/php_install.yml<\/em><\/p>\n<pre><code>--- # defaults file for laravel_role php_pkgs:     - php8.1     - php8.1-mbstring     - php8.1-gettext     - php8.1-zip     - php8.1-fpm     - php8.1-curl     - php8.1-mysql     - php8.1-gd     - php8.1-cgi     - php8.1-soap     - php8.1-sqlite3     - php8.1-xml     - php8.1-redis     - php8.1-bcmath     - php8.1-imagick     - php8.1-intl  composer_path: \/usr\/local\/bin\/composer<\/code><\/pre>\n<p><em>defaults\/main.yml<\/em><\/p>\n<p>\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u043d\u0430\u0431\u043e\u0440 \u0437\u0430\u0434\u0430\u0447 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u0435\u0442 \u043a\u043e\u0434 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u0430 Laravel. \u042f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u043f\u0440\u043e\u0435\u043a\u0442, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u0414\u0436\u0435\u0444\u0444\u0440\u0438 \u0423\u044d\u0439, Laravel From Scratch Blog Project, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u0430\u0439\u0442 \u0431\u043b\u043e\u0433\u0430 \u043f\u0440\u0438 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0438 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c Molecule.<\/p>\n<p>\u0412\u044b\u0448\u0435\u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u043a\u043b\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0430 \u043d\u0430\u0448 \u0445\u043e\u0441\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u043a <code>.env<\/code>, \u0442\u0430\u043a \u0438 <code>databse.php<\/code> \u0444\u0430\u0439\u043b\u044b. \u041c\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0434\u043b\u044f \u0444\u0430\u0439\u043b\u0430 .env, \u0432 <code>molecule.yml<\/code>. \u0414\u0430\u043b\u0435\u0435 \u043c\u044b \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 Composer \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443. \u041d\u0430\u043a\u043e\u043d\u0435\u0446, \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c Artisan \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0439, \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 <code>APP_KEY<\/code> \u0434\u043b\u044f \u0437\u0430\u0449\u0438\u0442\u044b \u043d\u0430\u0448\u0435\u0433\u043e \u0441\u0430\u0439\u0442\u0430.<\/p>\n<pre><code>--- - name: create \/var\/www\/ directory   file:      dest: \/var\/www\/     state: directory     owner: www-data     group: www-data     mode: 0700  - block:   - name: Clone git repository     git:       dest: \/var\/www\/laravel       repo: https:\/\/github.com\/JeffreyWay\/Laravel-From-Scratch-Blog-Project.git       update: no     register: repo     - name: set .env file     template:       src: env.j2       dest: \/var\/www\/laravel\/.env    - name: set database.php conf file     copy:       src: database.php       dest: \/var\/www\/laravel\/config\/database.php       mode: u+rw,g-rw,o-r    - name: Composer update     command:       cmd: composer update       chdir: \/var\/www\/laravel    - name: composer install     command:       cmd: composer install       chdir: \/var\/www\/laravel    - name: php artisan steps     command:       cmd: php artisan {{ item }}       chdir: \/var\/www\/laravel     with_items:       - migrate --seed --force       - storage:link       - config:clear       - key:generate --force   become: true   become_user: www-data   notify:       - restart php8.1-fpm       - restart nginx<\/code><\/pre>\n<p><em>tasks\/deploy_site.php<\/em><\/p>\n<pre><code>DB_CONNECTION={{ lookup('env','DB_CONNECTION') }} DB_HOST={{ lookup('env','DB_HOST') }} DB_PORT={{ lookup('env','DB_PORT') }} DB_DATABASE={{ lookup('env','DB_DATABASE') }} DB_USERNAME={{ lookup('env','DB_USERNAME') }} DB_PASSWORD={{ lookup('env','DB_PASSWORD') }} APP_ENV={{ lookup('env','APP_ENV') }} APP_DEBUG={{ lookup('env','APP_DEBUG') }} APP_KEY=<\/code><\/pre>\n<p><em>templates\/.env.j2<\/em><\/p>\n<pre><code>&lt;?php  use Illuminate\\Support\\Str;  return [      'default' => env('DB_CONNECTION', 'mysql'),      'connections' => [          'mysql' => [             'driver' => 'mysql',             'url' => env('DATABASE_URL'),             'host' => env('DB_HOST', '127.0.0.1'),             'port' => env('DB_PORT', '3306'),             'database' => env('DB_DATABASE', 'forge'),             'username' => env('DB_USERNAME', 'forge'),             'password' => env('DB_PASSWORD', ''),             'unix_socket' => env('DB_SOCKET', ''),             'charset' => 'utf8mb4',             'collation' => 'utf8mb4_unicode_ci',             'prefix' => '',             'prefix_indexes' => true,             'strict' => true,             'engine' => 'InnoDB ROW_FORMAT=DYNAMIC',             'options' => extension_loaded('pdo_mysql') ? array_filter([                 PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),             ]) : [],         ],      ],      'migrations' => 'migrations',  ];<\/code><\/pre>\n<p><em>files\/database.php<\/em><\/p>\n<p>\u0412\u043e\u0442 \u0441 \u0447\u0435\u0433\u043e \u043c\u044b \u043d\u0430\u0447\u043d\u0435\u043c. \u0418\u043c\u0435\u0439\u0442\u0435 \u0432 \u0432\u0438\u0434\u0443, \u0447\u0442\u043e \u043c\u044b \u043d\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c \u0441\u0430\u043c \u0432\u0435\u0431-\u0441\u0430\u0439\u0442 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Molecule, \u043c\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u0441\u0430\u0439\u0442\u0430. \u0418 \u043f\u043e \u043c\u0435\u0440\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043c\u044b \u0438\u0441\u0441\u043b\u0435\u0434\u0443\u0435\u043c \u0438\u0434\u0435\u043c\u043f\u043e\u0442\u0435\u043d\u0442\u043d\u043e\u0441\u0442\u044c \u0438 linting, \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c \u044d\u0442\u0438 \u0444\u0430\u0439\u043b\u044b. \u041d\u043e, \u043f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043c\u044b \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a \u043a\u043e\u043c\u043f\u043e\u043d\u043e\u0432\u043a\u0435, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u043c\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 \u0438\u043b\u0438 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0431\u0435\u0437 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445. \u0427\u0442\u043e\u0431\u044b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e, \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u043d\u0430\u0448\u0435\u0439 Molecule \u0438 \u043d\u0430 \u0442\u043e, \u043a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432.  <\/p>\n<h2>Molecule<\/h2>\n<p><strong>\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b: \u041d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432<\/strong><\/p>\n<p>\u041e\u0434\u043d\u0438\u043c \u0438\u0437 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432 Molecule \u0438 Docker \u2013  \u043e\u043d\u0438 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430 \u0434\u043b\u044f \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432. \u0430 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u043b\u0438 \u0440\u043e\u043b\u044c \u043e\u0431\u043c\u0435\u043d\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f\u043c\u0438, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c. \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0430\u043c \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 MySQL, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 \u0438 \u0432\u0432\u0435\u0441\u0442\u0438 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0439 \u0440\u043e\u043b\u0438 Laravel.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u0444\u0430\u0439\u043b molecule.yml. \u041f\u043e\u0434\u043e\u0431\u043d\u043e \u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043c\u044b \u0434\u0435\u043b\u0430\u043b\u0438 \u0432 \u0447\u0430\u0441\u0442\u0438 1, \u0432 \u0431\u043b\u043e\u043a\u0435 platforms: &#8212; <\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-344546","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/344546","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=344546"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/344546\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=344546"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=344546"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=344546"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}