Make hostname in jail able to set from config
This commit is contained in:
parent
9202a2643c
commit
b0173c836a
1 changed files with 9 additions and 2 deletions
|
@ -8,6 +8,15 @@
|
|||
}}
|
||||
_iter_config_lines: []
|
||||
|
||||
- name: Setting hostname for jail
|
||||
set_fact:
|
||||
_iter_config_opts: >-
|
||||
{{
|
||||
_iter_config_opts| combine(
|
||||
{ 'host.hostname': _iter_config_opts.get('host.hostname', 'jail-' + vars['jail_' + jail_name + '_newest_id']) }
|
||||
)
|
||||
}}
|
||||
|
||||
- name: Converting config dict into config lines
|
||||
set_fact:
|
||||
_iter_config_lines: >-
|
||||
|
@ -34,7 +43,6 @@
|
|||
block: |
|
||||
{{ vars['jail_' + jail_name + '_newest_id'] }} {
|
||||
path="{{ vars['jail_' + jail_name + '_new_path']|quote }}";
|
||||
host.hostname="jail-{{ vars['jail_' + jail_name + '_newest_id'] }}";
|
||||
ip4.addr="lo0|{{ vars['jail_' + jail_name + '_new_ip4'] }}"/32;
|
||||
{{ _iter_flattened_config }}
|
||||
}
|
||||
|
@ -50,7 +58,6 @@
|
|||
block: |
|
||||
{{ vars['jail_' + jail_name + '_newest_id'] }} {
|
||||
path="{{ vars['jail_' + jail_name + '_new_path']|quote }}";
|
||||
host.hostname="jail-{{ vars['jail_' + jail_name + '_newest_id'] }}";
|
||||
ip4.addr="lo0|{{ vars['jail_' + jail_name + '_new_ip4'] }}/32";
|
||||
ip6.addr="bridge0|{{ vars['jail_' + jail_name + '_ip6'] }}/128";
|
||||
{{ _iter_flattened_config }}
|
||||
|
|
Loading…
Reference in a new issue