Releases: Diesel-Net/ansible-role-application
Refactor
Change `repository` variable to `app_name`
- also add
git_commit
Major overhaul
- repo/role name change
- change the value of
app_dir
to be~/applications
instead of~/.diesel
- deprecate/remove variables:
- Both of these variables probably should have been in the
ubuntu
role since they are paths specific to that OS, however this role was really centered around common application deployment tasks on a *nix hostSSL_CERT_FILE
LOCALTIME_FILE
docker_dir
- older versions of the docker ansible role used to depend on this
- Both of these variables probably should have been in the
- Change how the dynamic variables
version
andrepository
get populated. The old model basically defaulted to using the git branch as theversion
. The new model uses the ansible inventory names as the defaultversion
now.- these variables are designed to be easily overwritten, if needed.. e.g.
--extra_vars version=production
- these variables are designed to be easily overwritten, if needed.. e.g.
聽
Variable population methods:
repository: Will attempt to get the repository name from the environment variable $DRONE_REPO_NAME that Drone will set automatically within a Drone pipeline. Great, easy enough. If this variable is not present however, we will attempt to grab and use the top-level directory name, which is usually the same as the repository. This works well when running ansible locally from your machine, without Drone being in the mix.
version: Will use the name of your ansible inventory file (minus the extension). This works well if your inventory you pass is a flat single inventory file, e.g. .ansible/inventories/dev.yaml
There are however alternative ansible inventory layouts that use a nested folder structure, so if we detect that you are using an inventory structure like .ansible/inventories/dev/hosts
we will use the name of the directory instead. The result would be dev
for both of these scenarios.
Add better fallback values
specifically referring to the two main vars that get used almost everywhere in a pipeline to ensure uniqueness in file paths and docker repos/tags etc..
version
repository
remove unexpected parens
Merge pull request #7 from Diesel-Net/development fix unexpected parens
Add missing parens in git_branch variable definition
Merge pull request #6 from Diesel-Net/development Add missing parens
don't use tag for paths and stack prefix
Merge pull request #5 from Diesel-Net/development Fix variable setup. Meant for it to behave like this
Change var precedence of dynamically defined git variables
provide two vars that can be overridden:
- repository
- version
Fix ssl_cert_dir path
- Fix ssl_cert_dir to not include trailing slash
- Follows ansible pre-defined variables pattern
Initial Release
Common shared variables:
- git vars
- drone vars
- ssl vars
- directories