forked from evolix/ansible-roles
lxc: Init /etc git repository in lxc container
Note: ugly loop, but “it works”…
This commit is contained in:
parent
8f1fa57c37
commit
69bc93ff6e
|
@ -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
|
* proftpd: in SFTP vhost, enable SSH keys login, enable ed25549 host key for Debian >= 11
|
||||||
* bind: Update role for Buster, Bullseye and Bookworm support
|
* bind: Update role for Buster, Bullseye and Bookworm support
|
||||||
* kvmstats: use .capacity instead of .physical for disk size
|
* kvmstats: use .capacity instead of .physical for disk size
|
||||||
|
* lxc: Init /etc git repository in lxc container
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
|
|
|
@ -58,13 +58,13 @@
|
||||||
name: "{{ name }}"
|
name: "{{ name }}"
|
||||||
state: started
|
state: started
|
||||||
|
|
||||||
- name: "Ensure /etc/profile.d exists in container"
|
- name: "Ensure /etc/profile.d exists in container {{ name }}"
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "/var/lib/lxc/{{ name }}/rootfs/etc/profile.d"
|
path: "/var/lib/lxc/{{ name }}/rootfs/etc/profile.d"
|
||||||
mode: '0755'
|
mode: '0755'
|
||||||
state: directory
|
state: directory
|
||||||
|
|
||||||
- name: "Copy host /etc/profile.d/evolinux into container"
|
- name: "Copy host /etc/profile.d/evolinux into container {{ name }}"
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: "/etc/profile.d/evolinux.sh"
|
src: "/etc/profile.d/evolinux.sh"
|
||||||
remote_src: true
|
remote_src: true
|
||||||
|
@ -75,3 +75,22 @@
|
||||||
community.general.lxc_container:
|
community.general.lxc_container:
|
||||||
name: "{{ name }}"
|
name: "{{ name }}"
|
||||||
container_command: "DEBIAN_FRONTEND=noninteractive apt-get purge -y openssh-server"
|
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'
|
||||||
|
|
Loading…
Reference in a new issue