Commit 15106a28 authored by Pietsch, Martin's avatar Pietsch, Martin

introduce key 'jailname' for jail definition

parent 824ffd31
......@@ -29,6 +29,7 @@
container: >-
{% do container.container_options.update({'ip4.addr': container_options.ipv4 | join(',')}) if container_options.ipv4 is defined -%}
{% do container.container_options.update({'ip6.addr': container_options.ipv6 | join(',')}) if container_options.ipv6 is defined -%}
{% do container.update({'jailname': container.name | replace('.', '_')}) -%}
{{ container }}
- name: install fstab for container
......@@ -36,10 +37,11 @@
src: "{{ '%s.j2' | format(container.container_options['mount.fstab'] | basename) }}"
dest: "{{ '/etc/%s' | format(container.container_options['mount.fstab'] | basename) }}"
mode: 0644
when: container.container_options['mount.fstab'] is defined
- name: create "{{ container.name }}" container
jail:
name: "{{ container.name }}"
name: "{{ container.jailname }}"
mirror: "{{ freebsd_install_local_mirror | default(freebsd_install_home_mirror) }}"
rcconf:
sendmail_enable: "NONE"
......@@ -53,7 +55,7 @@
- name: start "{{ container.name }}" container
jail:
name: "{{ container.name }}"
name: "{{ container.jailname }}"
state: start
- import_tasks: registercontainer.yml
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment