-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from sitewards/adhoc-add-azure
Adhoc add azure
- Loading branch information
Showing
4 changed files
with
44 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
# The AWS S3 ansible role is deliberately not used, as it does not handle multipart uploads well. | ||
# See https://github.com/ansible/ansible/issues/5442 | ||
# | ||
# This expects to authenticat based on the invokers AWS credentials, supplied through environment variables | ||
- name: "Download Magento release" | ||
shell: | | ||
AWS_ACCESS_KEY_ID="{{ lookup('env', 'AWS_ACCESS_KEY_ID') }}" \ | ||
AWS_SECRET_ACCESS_KEY="{{ lookup('env', 'AWS_SECRET_ACCESS_KEY') }}" \ | ||
aws s3 cp s3://{{ magento_bucket_name }}/{{ magento_storage_file_path }} {{ magento_workdir }} \ | ||
--cli-read-timeout 300 \ | ||
--cli-connect-timeout 0 | ||
args: | ||
creates: "{{ magento_workdir }}/{{ magento_storage_file_name }}" | ||
when: | ||
- not magento_release_stat.stat.exists | ||
- magento_skip_release == False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
# This expects to authenticat based on the invokers Azure credentials, supplied through environment variables | ||
- name: "Download Magento release" | ||
shell: | | ||
AZURE_CLIENT_ID="{{ lookup('env','AZURE_CLIENT_ID') }}" \ | ||
AZURE_SECRET="{{ lookup('env','AZURE_SECRET') }}" \ | ||
AZURE_TENANT="{{ lookup('env','AZURE_TENANT') }}" \ | ||
AZURE_SUBSCRIPTION_ID="{{ lookup('env','AZURE_SUBSCRIPTION_ID') }}" \ | ||
AZURE_STORAGE_ACCOUNT="{{ lookup('env','AZURE_STORAGE_ACCOUNT') }}" \ | ||
AZURE_STORAGE_KEY="{{ lookup('env','AZURE_STORAGE_KEY') }}" \ | ||
az storage blob download --container-name="{{ lookup('env','AZURE_APP_RELEASES_BLOB_CONTAINER_NAME') }}" --file={{ magento_workdir }}/{{ magento_storage_file_name }} --name={{ magento_storage_file_path }} | ||
args: | ||
creates: "{{ magento_workdir }}/{{ magento_storage_file_name }}" | ||
when: | ||
- not magento_release_stat.stat.exists | ||
- magento_skip_release == False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters