Closed jgraup closed 7 years ago
These are fantastic suggestions, thanks for taking the time to submit this. I'll see what I can do about getting these all working.
Before getting to specifics, I went through the config.yml
file and attempted to clarify and better document each setting. Those options are tested and used, the values in ansible/defaults/main.yml
are fallbacks and not intended to be changed.
Specific issues from above:
Done: 4161d11198362f000
I really haven't tested this at all. My reason for putting the value into a variable was simply to be able to programmatically assemble installation paths on the server. Changing the web_dir
to something other than site
would require overriding a number of settings on the base box. It might be doable, but I don't think it would be worth the complexity. If the install path is a huge problem, it's probably better to use a database migration tool to alter paths.
A similar option is wp_dir
which can install WordPress to a specific subdirectory.
This setting is comes from the base box, wp_user@localhost
is the sole DB user with full access to everything. I'm open to use cases where it would make sense to add additional DB users to each instance. Remember, the goal of this project is to mimic managed hosting environments and simplify away configuration options that are unavailable on those hosts.
This can be changed in the Vagrantfile
. Just specify any hostname before the Vagrant.configure
block, Ansible will inherit the hostname from the VM and the dev site will be available at that address. Here's an example:
# add a fake-TLD '.dev' extension
$hostname = $hostname.gsub(/(\.dev)*$/, '') + '.dev'
# Override the above, hostname will be dev.example.com
$hostname = 'dev.example.com'
This is probably beyond the scope of what I want to do with this project.
But if you've got a shell script, it's very simple to have Ansible call that script from a post-tasks block. Using the Ansible Script module, it'd look something like this:
post_tasks:
- name: Run post-install script
script: scripts/do_stuff_with_wp-cli.sh
You could also just paste the commands into a command or shell.
@jgraup I think most everything has been covered. Re-open or start a new issue if there's something you'd like to see carried over from here. Thanks again for this.
Thanks @joemaller. I appreciate everything you've done so far. Been busy with other things but I hope to revisit this sooner than later.
I find myself wanting to migrate to using this box more often that not but I need to ensure the DB and Host settings are closer to my existing environment.
It would be nice to add some things to the config.yml or allow some flexibility with these settings. Adding these as overrides in the config can keep the project lean and mean.
Some of these work, some fail.
Based on ## 0.1.0
I can directly modify the template file but using the config will keep the changes in one place.
403 Forbidden when modified, but WordPress does install to the directory supplied.
Changing
db_name
seems to work OK but the other settings seem to fail. Possibly set here.While it's handy creating a
.dev
, trying to sync with an existing site is rough. An override for the$hostname
would be ideal. This does work well when setting the override after yourfake-TLD
.Example: Update WP-CLI, install WordPress, convert to multisite, and add a site.