Re: [ansible-project] Keeping inventory and other data separate from code

2022-04-16 Thread Richard Hector

On 2/04/22 16:07, Nico Kadel-Garcia wrote:

On Fri, Apr 1, 2022 at 10:27 PM Richard Hector  wrote:


Hi all,

Currently my inventory is stored in the same git repo as my play(book)s,
roles etc, which I don't like.


Consider using git submodules if you want a unified workspace.


Hmm. I got thoroughly confused by submodules last time I tried them. And 
didn't Linus say he regretted having devised them in the first place?


Is there an easy way to have a non-unified workspace, so that I can use 
separate repos more easily?


Cheers,
Richard


What are common ways to avoid this? Perhaps keep inventory in a subdir
which is .gitignored, and make that a separate repo?

I also want to keep data which is not strictly inventory - eg lists of
users, ssh keys etc which are specific to my site/business, but shared
across many hosts and groups. I think I need to use lookups to access
this. Perhaps that data and inventory can go together in that other repo?

eg:

/home/richard/ansible/
   .git/
 .gitignore (ansible/data)
   .ansible.cfg
   /data
 .git/
 /inventory
   hosts
   /host_vars
   /group_vars
 users.yml
   /plays
   /roles

Does that seem reasonable?

That way, if (when) I have questions in the future, I can refer you all
to my ansible repo without sharing the private data :-)

Are there better ways to do this?

Cheers,
Richard

--
You received this message because you are subscribed to the Google Groups "Ansible 
Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/c0b602a7-b40e-7254-f153-c98a49dd3046%40walnut.gen.nz.




--
You received this message because you are subscribed to the Google Groups "Ansible 
Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/1119bcec-83e7-f0f6-5fa3-c40ae074af59%40walnut.gen.nz.


Re: [ansible-project] Keeping inventory and other data separate from code

2022-04-01 Thread Nico Kadel-Garcia
On Fri, Apr 1, 2022 at 10:27 PM Richard Hector  wrote:
>
> Hi all,
>
> Currently my inventory is stored in the same git repo as my play(book)s,
> roles etc, which I don't like.

Consider using git submodules if you want a unified workspace.

> What are common ways to avoid this? Perhaps keep inventory in a subdir
> which is .gitignored, and make that a separate repo?
>
> I also want to keep data which is not strictly inventory - eg lists of
> users, ssh keys etc which are specific to my site/business, but shared
> across many hosts and groups. I think I need to use lookups to access
> this. Perhaps that data and inventory can go together in that other repo?
>
> eg:
>
> /home/richard/ansible/
>.git/
>  .gitignore (ansible/data)
>.ansible.cfg
>/data
>  .git/
>  /inventory
>hosts
>/host_vars
>/group_vars
>  users.yml
>/plays
>/roles
>
> Does that seem reasonable?
>
> That way, if (when) I have questions in the future, I can refer you all
> to my ansible repo without sharing the private data :-)
>
> Are there better ways to do this?
>
> Cheers,
> Richard
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to ansible-project+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/ansible-project/c0b602a7-b40e-7254-f153-c98a49dd3046%40walnut.gen.nz.

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAOCN9ryjniK1KgQ33d3-RW0xLK-NM6Zz%3DJoEbyVDJy_LYxKJQw%40mail.gmail.com.


[ansible-project] Keeping inventory and other data separate from code

2022-04-01 Thread Richard Hector

Hi all,

Currently my inventory is stored in the same git repo as my play(book)s, 
roles etc, which I don't like.


What are common ways to avoid this? Perhaps keep inventory in a subdir 
which is .gitignored, and make that a separate repo?


I also want to keep data which is not strictly inventory - eg lists of 
users, ssh keys etc which are specific to my site/business, but shared 
across many hosts and groups. I think I need to use lookups to access 
this. Perhaps that data and inventory can go together in that other repo?


eg:

/home/richard/ansible/
  .git/
.gitignore (ansible/data)
  .ansible.cfg
  /data
.git/
/inventory
  hosts
  /host_vars
  /group_vars
users.yml
  /plays
  /roles

Does that seem reasonable?

That way, if (when) I have questions in the future, I can refer you all 
to my ansible repo without sharing the private data :-)


Are there better ways to do this?

Cheers,
Richard

--
You received this message because you are subscribed to the Google Groups "Ansible 
Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/c0b602a7-b40e-7254-f153-c98a49dd3046%40walnut.gen.nz.