ansible: support full offline use for lampstack

Add three new app_env options:

  wp_latest
  wp_cli
  wp_importer

these can be used to override the default install locations
for wordpress and various utilities used by the playbooks,
ensuring that the playbook can be configured for use in
environments where network egress to the internet is limited.

Change-Id: I9db0d8e562fdb74c9c68cb9881d6a2bbb7e4e77a
This commit is contained in:
James Page 2016-10-18 14:05:46 +01:00
parent 8ad2015099
commit d856841a87
3 changed files with 13 additions and 3 deletions

View File

@ -68,6 +68,16 @@ You may create one such file per cloud for your tests.
wp_posts: "http://wpcandy.s3.amazonaws.com/resources/postsxml.zip"
}
It's also possible to provide download URL's for wordpress and associated
other utilities, supporting use of this module in environments with limited
outbound network access to the Internet (defaults show below):
app_env: {
...
wp_latest: 'https://wordpress.org/latest.tar.gz',
wp_cli: 'https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar',
wp_importer: 'http://downloads.wordpress.org/plugin/wordpress-importer.0.6.3.zip'
}
The values of these variables should be provided by your cloud provider. When
use keystone 2.0 API, you will not need to setup domain name. You can leave

View File

@ -43,7 +43,7 @@
- name: Download wordpress
get_url:
url: https://wordpress.org/latest.tar.gz
url: "{{ app_env.wp_latest or 'https://wordpress.org/latest.tar.gz' }}"
dest: /var/www/latest.tar.gz
- name: Unpack latest wordpress
@ -92,7 +92,7 @@
- name: Install wordpress command line tool
get_url:
url: https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
url: "{{ app_env.wp_cli or 'https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar' }}
dest: /usr/local/bin/wp
mode: "a+x"
force: no

View File

@ -26,7 +26,7 @@
- name: Download wordpress importer plugin
get_url:
url: "http://downloads.wordpress.org/plugin/wordpress-importer.0.6.3.zip"
url: "{{ app_env.wp_importer or 'http://downloads.wordpress.org/plugin/wordpress-importer.0.6.3.zip' }}"
dest: /tmp/wordpress-importer.zip
force: yes