ansible-oracle icon indicating copy to clipboard operation
ansible-oracle copied to clipboard

example for new structure in inventory

Open Rendanic opened this issue 7 years ago • 3 comments
trafficstars

I reorgnized the directory structure for my inventory in ansible-oracle.

tree inventory/

inventory/
└── orafs
    ├── group_vars
    │   └── all
    ├── hosts
    └── host_vars
        └── oradb03
            └── vars.yml
        └── oradb04
            └── vars.yml

Replace hosts with symbolic links to the files in inventory when a central file for the hosts-inventory is used. The advantage is a clear structure for each 'hosts' in the playbook. Adding the ansible-vault is very easy. Just add a file vault.yml in the directory of vars.yml.

The host_vars and group_vars from '/' could be removed. This makes the whole structure for projects with own configurations much cleaner. Removing the examples is very easy as well.

What do you think about the structure?

Rendanic avatar Apr 22 '18 09:04 Rendanic

The example is related to #38.

I could give some examples how I used the vault within the structure.

Rendanic avatar Apr 22 '18 09:04 Rendanic

Yeah, I like that structure, but I'm not going to change everything to that (at least not now)

For #38, I kept it simpler and just did this:

group_vars/vbox-si-asm/
                    |-- passwords.yml
                    `-- vbox-si-asm.yml 

and it works very well.

I have a bunch of re-factoring that I have to finish, and after that is done I'll look into maybe changing the entire inventory structure. But, I have tested the structure you're using and I like it, so it will probably end up looking like that eventually.

oravirt avatar Apr 22 '18 11:04 oravirt

is there a branch for this example?

edperry avatar Dec 18 '18 21:12 edperry

The example inventory will be replaced by a new one in the future. Closing it here.

Rendanic avatar Aug 31 '22 19:08 Rendanic