1 |
On 2015-01-11 09:22, Alan McKinnon wrote: |
2 |
> On 11/01/2015 09:46, Tomas Mozes wrote: |
3 |
>> On 2015-01-10 23:11, Alan McKinnon wrote: |
4 |
>>> On 10/01/2015 21:40, Tomas Mozes wrote: |
5 |
>>> |
6 |
>>> |
7 |
>>>> Ansible is a not a backup solution. You don't need to download your |
8 |
>>>> /etc |
9 |
>>>> from the machines because you deploy your /etc to machines via |
10 |
>>>> ansible. |
11 |
>>>> |
12 |
>>>> I was also thinking about putting /etc in git and then deploying it |
13 |
>>>> but: |
14 |
>>>> - on updates, will you update all configurations in all /etc repos? |
15 |
>>>> - do you really want to keep all the information in git, is it |
16 |
>>>> necessary? |
17 |
>>> |
18 |
>>> The set of fileS in /etc/ managed by ansible is always a strict |
19 |
>>> subset |
20 |
>>> of everything in /etc |
21 |
>>> |
22 |
>>> For that reason alone, it's a good idea to back up /etc anyway, |
23 |
>>> regardless of having a CM system in place. The smallest benefit is |
24 |
>>> knowing when things changed, by the cm SYSTEM or otherwise |
25 |
>> |
26 |
>> For what reason? |
27 |
> |
28 |
> For the simple reason that ansible is not the only system that can make |
29 |
> changes in /etc |
30 |
> |
31 |
>> And how does a workflow look like then? You commit changes to your git |
32 |
>> repo of ansible. Then you deploy via ansible and check the /etc of |
33 |
>> each |
34 |
>> machine and commit a message that you changed something via ansible? |
35 |
> |
36 |
> |
37 |
> When you commit to the ansible repo, you are committing and tracking |
38 |
> changes to the *ansible* config. You are not tracking changes to /etc |
39 |
> on |
40 |
> the actual destination host, that is a separate problem altogether and |
41 |
> not directly related to the fact that ansible logs in and does various |
42 |
> s |
43 |
> |
44 |
> You can make your workflow whatever makes sense to you. |
45 |
> |
46 |
> The reason I'm recommending to keep all of /etc in it's own repo is |
47 |
> that |
48 |
> it's the simplest way to do it. /etc/ is a large mixture of |
49 |
> ansible-controlled files, sysadmin-controlled files, and other |
50 |
> arbitrary |
51 |
> files installed by the package manager. It's also not very big, around |
52 |
> 10M or so typically. So you *could* manually add to a repo every file |
53 |
> you change manually, but that is error-prone and easy to forget. |
54 |
> Simpler |
55 |
> to just commit everything in /etc which gives you an independant record |
56 |
> of all changes over time. Have you ever dealt with a compliance |
57 |
> auditor? |
58 |
> An independant change record that is separate from the CM itself is a |
59 |
> feature that those fellows really like a lot. |
60 |
|
61 |
Out of curiosity, "ansible-controlled files, sysadmin-controlled files" |
62 |
means that something is managed via ansible and something is done |
63 |
manually? |
64 |
|
65 |
And then, /etc is not the only directory with changing files, what about |
66 |
other directories? |
67 |
|
68 |
Regarding the workflow with /etc in git vs ansible in git I was asking |
69 |
about your concrete workflow so we can learn from it and maybe apply |
70 |
some good practices on our servers as well. |