lxc: Init /etc git repository in lxc container
All checks were successful
Ansible Lint |Total|New|Outstanding|Fixed|Trend |:-:|:-:|:-:|:-:|:-: |2643|6|2637|4|:-1: Reference build: <a href="https://jenkins.evolix.org/job/gitea/job/ansible-roles/job/unstable/406//ansiblelint">Evolix » ansible-roles » unstable #406</a>
gitea/ansible-roles/pipeline/head This commit looks good

Note: ugly loop, but “it works”…
This commit is contained in:
David Prevot 2023-11-24 11:23:29 +01:00
parent 8f1fa57c37
commit 69bc93ff6e
2 changed files with 22 additions and 2 deletions

View file

@ -30,6 +30,7 @@ The **patch** part changes is incremented if multiple releases happen the same m
* proftpd: in SFTP vhost, enable SSH keys login, enable ed25549 host key for Debian >= 11
* bind: Update role for Buster, Bullseye and Bookworm support
* kvmstats: use .capacity instead of .physical for disk size
* lxc: Init /etc git repository in lxc container
### Fixed

View file

@ -58,13 +58,13 @@
name: "{{ name }}"
state: started
- name: "Ensure /etc/profile.d exists in container"
- name: "Ensure /etc/profile.d exists in container {{ name }}"
ansible.builtin.file:
path: "/var/lib/lxc/{{ name }}/rootfs/etc/profile.d"
mode: '0755'
state: directory
- name: "Copy host /etc/profile.d/evolinux into container"
- name: "Copy host /etc/profile.d/evolinux into container {{ name }}"
ansible.builtin.copy:
src: "/etc/profile.d/evolinux.sh"
remote_src: true
@ -75,3 +75,22 @@
community.general.lxc_container:
name: "{{ name }}"
container_command: "DEBIAN_FRONTEND=noninteractive apt-get purge -y openssh-server"
- name: "Init /etc git repository in container {{ name }}"
ansible.builtin.include_role:
name: 'etc-git'
tasks_from: 'repository.yml'
apply:
vars:
gitignore_items:
- "aliases.db"
- "*.swp"
- "postfix/sa-blacklist.access"
- "postfix/*.db"
- "postfix/spamd.cidr"
- "evobackup/.keep-*"
- "letsencrypt/.certbot.lock"
become: yes
loop: ["/var/lib/lxc/{{ name }}/rootfs/etc/"]
loop_control:
loop_var: 'repository_path'