Commit 76cbcbed authored by Илья Крылов's avatar Илья Крылов
Browse files

Fix playbook

parent e30bfbfb
---
- name: PHP application playbook
hosts: all
become: true
become: yes
vars:
timezone: Europe/Moscow
......@@ -23,7 +23,10 @@
db_name: 'db_name'
db_username: 'db_username'
db_password: 'db_password'
git_repo: 'ssh://git@git.cloud-team.ru/lections/ansible-php-app.git'
git_branch: 'master'
composer_version: 1.9.3
composer_no_dev: no
composer_global_requirements:
- fxp/composer-asset-plugin:1.4.3
composer_github_auth_token: 'dbd6c5966b80f1379ad6c341fef220b8206ae985'
......@@ -163,17 +166,20 @@
- name: Set up private key for deploy user
copy:
src: 'files/ssh/deploy_public_key.pub'
src: 'files/ssh/deploy_private_key'
dest: '{{ deploy_home }}/.ssh/id_rsa'
owner: '{{ deploy_user }}'
group: '{{ deploy_user_group }}'
mode: '0600'
- name: Get known hosts keys
become_user: '{{ deploy_user }}'
shell: ssh-keyscan -H github.com git.cloud-team.ru
register: khown_hosts
- name: Set known hosts keys
copy:
content: '{{ khown_hosts }}'
content: '{{ khown_hosts.stdout }}'
dest: '{{ deploy_home }}/.ssh/known_hosts'
owner: '{{ deploy_user }}'
group: '{{ deploy_user_group }}'
......@@ -250,9 +256,9 @@
- name: Clone application source code
become_user: '{{ deploy_user }}'
git:
repo: 'git@git.cloud-team.ru:lections/ansible-php-app.git'
repo: '{{ git_repo }}'
dest: '{{ app_dir }}'
version: master
version: '{{ git_branch }}'
- name: Copy application configuration files
become_user: '{{ deploy_user }}'
......@@ -263,6 +269,7 @@
become_user: '{{ deploy_user }}'
composer:
command: install
no_dev: '{{ composer_no_dev }}'
working_dir: '{{ app_dir }}'
- name: Migrate database
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment