Skip to content

Commit

Permalink
Merge pull request #20 from sitewards/adhoc-add-custom-mysql-port-sup…
Browse files Browse the repository at this point in the history
…port

ADHOC [feat]: add support for custom mysql port
  • Loading branch information
skalenji authored Aug 23, 2021
2 parents d0951eb + 8eeb9a2 commit 71e67cf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ magento_mode: "default"
# password: ""
# host: ""
# name: ""
# port: ""

## The database connections that contain the Magento data that Magento accesses
## See http://devdocs.magento.com/guides/v2.0/config-guide/config/config-php.html
Expand Down
4 changes: 2 additions & 2 deletions tasks/installation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@
- name: "Check if Magento database exists"
shell:
cmd: |
mysql --user="{{ magento_config_db.username }}" --password="{{ magento_config_db.password }}" --database="{{ magento_config_db.name }}" --host="{{ magento_config_db.host }}" <<EOF
mysql --user="{{ magento_config_db.username }}" --password="{{ magento_config_db.password }}" --database="{{ magento_config_db.name }}" --host="{{ magento_config_db.host }}" --port="{{ magento_config_db.port | default('3306') }}" <<EOF
SHOW TABLES LIKE 'core_config_data';
EOF
register: magento_db_status
Expand All @@ -184,7 +184,7 @@
- name: "Enforce core configuration data"
shell:
cmd: |
mysql --user="{{ magento_config_db.username }}" --password="{{ magento_config_db.password }}" --database="{{ magento_config_db.name }}" --host="{{ magento_config_db.host }}" <<EOF
mysql --user="{{ magento_config_db.username }}" --password="{{ magento_config_db.password }}" --database="{{ magento_config_db.name }}" --host="{{ magento_config_db.host }}" --port="{{ magento_config_db.port | default('3306') }}" <<EOF
INSERT INTO core_config_data (path, scope, scope_id, value)
VALUES (
'{{ item.path }}',
Expand Down

0 comments on commit 71e67cf

Please sign in to comment.