[WIP] Correct putting /etc of container in git being skipped

This commit is contained in:
Mathieu Trossevin 2022-03-14 09:29:58 +01:00
parent 9fbda8d2e1
commit ead025b747
Signed by untrusted user who does not match committer: mtrossevin
GPG key ID: D1DBB7EA828374E9
5 changed files with 10 additions and 6 deletions

View file

@ -45,8 +45,10 @@
- name: "Some entries MUST be in the {{ repository_path }}/.gitignore file"
lineinfile:
dest: "{{ repository_path }}/.gitignore"
line: "{{ item }}"
line: "{{ gitignore_line }}"
loop: "{{ gitignore_items | default([]) }}"
loop_control:
loop_var: gitignore_line
tags:
- etc-git

1
lxc/files/gitignore Symbolic link
View file

@ -0,0 +1 @@
../../etc-git/files/gitignore

View file

@ -53,9 +53,7 @@
when: release == 'jessie'
- name: "Put /etc of container {{ name }} into git"
include_role:
name: evolix/etc-git
tasks_from: repository.yml
import_tasks: repository.yml
vars:
repository_path: "/var/lib/lxc/{{ name }}/rootfs/etc"
gitignore_items:

View file

@ -52,6 +52,8 @@
- name: Create containers
include: create-container.yml
vars:
name: "{{ item.name }}"
release: "{{ item.release }}"
name: "{{ container.name }}"
release: "{{ container.release }}"
loop: "{{ lxc_containers }}"
loop_control:
loop_var: container

1
lxc/tasks/repository.yml Symbolic link
View file

@ -0,0 +1 @@
../../etc-git/tasks/repository.yml