Merge pull request #205 from davestephens/config-rejig

Config Rejig Updates
This commit is contained in:
David Stephens 2020-01-08 20:39:28 +00:00 committed by GitHub
commit 846d248312
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 12 additions and 9 deletions

View file

@ -21,7 +21,7 @@ You can run Ansible-NAS from the computer you plan to use for your NAS, or from
`cp -rfp inventories/sample inventories/my-ansible-nas`
5. Review `group_vars/all.yml`. Change settings by overriding them in `inventories/my-ansible-nas/group_vars/all.yml`.
5. Review `group_vars/all.yml`. Change settings by overriding them in `inventories/my-ansible-nas/group_vars/nas.yml`.
6. Update `inventories/my-ansible-nas/inventory`.

View file

@ -4,9 +4,9 @@
If you're upgrading from [this](https://github.com/davestephens/ansible-nas/commit/52c7fef3aba08e30331931747c81fb7b3bfd359a) commit or earlier, these instructions are relevant to you.
Rather than having to merge every new config line into your own `all.yml` file, now you only need to maintain the differences that are relevant to you in your own `all.yml`, stored within an inventory directory. Your inventory `all.yml` takes prescendence over `group_vars/all.yml`, which is how this setup works. `group_vars/all.yml` is now tracked as part of the repo.
Rather than having to merge every new config line into your own `all.yml` file, now you only need to maintain the differences that are relevant to you in your own `nas.yml`, stored within an inventory directory. Your inventory `nas.yml` takes prescendence over `group_vars/all.yml`, which is how this setup works. `group_vars/all.yml` is now tracked as part of the repo.
This will make updates from `master` much simpler, as there will be no requirement to merge changes from `all.yml.dist` into your own `all.yml` any more. You simply pull from master, then add the bits you're interested in into your inventory `all.yml`.
This will make updates from `master` much simpler, as there will be no requirement to merge changes from `all.yml.dist` into your own `all.yml` any more. You simply pull from master, then add the bits you're interested in into your inventory `nas.yml`.
Instructions to upgrade from prior to January 2020 ([this]([this](https://github.com/davestephens/ansible-nas/commit/52c7fef3aba08e30331931747c81fb7b3bfd359a)) commit or earlier):
@ -22,7 +22,7 @@ Instructions to upgrade from prior to January 2020 ([this]([this](https://github
- Then:
- **Quick and Dirty:** Copy the contents of your `all.yml` into `inventories/my-ansible-nas/all.yml`.
- **Quick and Dirty:** Copy the contents of your `all.yml` into `inventories/my-ansible-nas/group_vars/nas.yml`.
- **Nice and Tidy:** Copy only the differences between your own `all.yml` and the distribution `group_vars/all.yml` into `inventories/my-ansible-nas/all.yml`. This is likely to be things like `ansible_nas_hostname`, `samba_shares`, `ansible_nas_timezone`, enabled applications, any application tweaks you've made in config etc.
- **Nice and Tidy:** Copy only the differences between your own `all.yml` and the distribution `group_vars/all.yml` into `inventories/my-ansible-nas/group_vars/nas.yml`. This is likely to be things like `ansible_nas_hostname`, `samba_shares`, `ansible_nas_timezone`, enabled applications, any application tweaks you've made in config etc.

View file

@ -8,7 +8,7 @@
###
### DO NOT EDIT THIS FILE!
### Add your customisations to inventories/<your_inventory>/group_vars/all.yml
### Add your customisations to inventories/<your_inventory>/group_vars/nas.yml
###
###

View file

@ -6,10 +6,13 @@
## \/ \/ \/ \/ \/ \/ \/ \/
## a n s i b l e - n a s https://github.com/davestephens/ansible-nas
[all]
## Example when running from a remote workstation
# ansible-nas ansible_host=192.168.1.30
## Example when running directly on your Ansible-NAS server
# localhost ansible_connection=local
# ansible-nas ansible_connection=local ansible_host=localhost
## Example when running from a remote workstation
# 192.168.1.30
[nas]
ansible-nas