Name: plesk-deploy-ansible
Owner: Plesk
Description: null
Created: 2017-06-15 10:15:26.0
Updated: 2018-04-24 07:41:41.0
Pushed: 2017-06-15 10:30:35.0
Homepage: null
Size: 24
Language: Shell
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
The playbooks allow to deploy Plesk in cases:
You need ansible v2+ You can run ansible in two ways.
The first one directly via CLI. In such case you need to have ansible installed on your machine:
Sample: ansible-playbook -i hosts plesk-amazon-ec2-from-ami.yml
The second way is to use Ansible shipped via Docker container. This way is preferred if you already use Docker and don't want to install one more piece of software to your machine because ansible is usually installed via pip, it also can require some additional libs, etc etc etc.
Note: see open issue, described in FAQ below.
To use this approach, you can just have Docker installed, and you need to run as follows: ./ansible-playbook-viadocker -i hosts plesk-amazon-ec2-from-ami.yml
That's it.
Few words about inventory. It has two parts:
Note: Credentials inventory file is not included in a git repo and is added to .gitignore file
To start work with the Plesk deployment playbooks you should:
cp -f group_vars/credentials.yml.sample group_vars/credentials.yml
When you attempt to create VM from AMI published in Marketplace, you can see a message similar to the sample below. All you need to do - just copy the provided link and navigate it in your browser with an active session to your Amazon AWS account. This is required to authorize the script for deployment on behalf of your AWS account from CLI.
TASK [amazon-ec2 : Create EC2 Instance]
fatal: [localhost]: FAILED! => {“changed”: false, “failed”: true, “msg”: “Instance creation failed => OptInRequired: In order to use this AWS Marketplace product you need to accept terms and subscribe. To do so please visit http://aws.amazon.com/marketplace/pp?sku=dw81irkz67efb1tr712312313uet”}
Execution ansible-playbook via Docker
There is a known with required libs in the packages docker image. The following image is used https://hub.docker.com/r/williamyeh/ansible/ since ansible doesn't support/develop their own. So, since the latest roles update, execution via docker doesn't work for now :(