Fix path for lxc-net config on distro.
Introducing system_config_dir to configure where the lxc-net file is located on centos or ubuntu. Change-Id: I3e2bbfd81f17b8a697ed9d7cad81c89b2b48ba9f
This commit is contained in:
@@ -46,7 +46,7 @@
|
||||
- name: Drop irqbalance config
|
||||
template:
|
||||
src: "irqbalance.j2"
|
||||
dest: "/etc/default/irqbalance"
|
||||
dest: "{{ system_config_dir }}/irqbalance"
|
||||
owner: "root"
|
||||
group: "root"
|
||||
mode: "0644"
|
||||
|
@@ -33,7 +33,7 @@
|
||||
with_items:
|
||||
- { src: lxc-openstack.conf.j2, dest: "/etc/lxc/lxc-openstack.conf" }
|
||||
- { src: default.conf.j2, dest: "/etc/lxc/default.conf" }
|
||||
- { src: lxc.default.j2, dest: "/etc/default/lxc-net", mode: "0644" }
|
||||
- { src: lxc.default.j2, dest: "{{ system_config_dir}}/lxc-net", mode: "0644" }
|
||||
- { src: lxc-system-manage.j2, dest: "/usr/local/bin/lxc-system-manage", mode: "0755" }
|
||||
tags:
|
||||
- lxc-files
|
||||
|
@@ -129,8 +129,8 @@ function pre_up {
|
||||
fi
|
||||
|
||||
# Source the lxc defaults
|
||||
if [[ -f "/etc/default/lxc" ]]; then
|
||||
source "/etc/default/lxc"
|
||||
if [[ -f "{{ system_config_dir}}/lxc" ]]; then
|
||||
source "{{ system_config_dir}}/lxc"
|
||||
fi
|
||||
|
||||
# Set the lock type where applicable
|
||||
|
@@ -14,6 +14,7 @@
|
||||
# limitations under the License.
|
||||
|
||||
lxc_download_url: "https://linuxcontainers.org/downloads/lxc/lxc-2.0.4.tar.gz"
|
||||
system_config_dir: "/etc/sysconfig"
|
||||
|
||||
# Required rpm packages.
|
||||
lxc_hosts_distro_packages:
|
||||
|
@@ -36,6 +36,7 @@ lxc_hosts_distro_packages:
|
||||
- python3-lxc
|
||||
- pxz
|
||||
|
||||
system_config_dir: "/etc/default"
|
||||
lxc_cache_map:
|
||||
distro: ubuntu
|
||||
arch: "{{ lxc_architecture_mapping.get( ansible_architecture ) }}"
|
||||
|
@@ -37,6 +37,7 @@ lxc_hosts_distro_packages:
|
||||
- python3-lxc
|
||||
- pxz
|
||||
|
||||
system_config_dir: "/etc/default"
|
||||
lxc_cache_map:
|
||||
distro: ubuntu
|
||||
arch: "{{ lxc_architecture_mapping.get( ansible_architecture ) }}"
|
||||
|
Reference in New Issue
Block a user