Browse Source

add proxy support

main
Nicolas Massé 5 years ago
parent
commit
bbe28dd320
  1. 19
      templates/lb/cloud-init.cfg
  2. 17
      templates/storage/cloud-init.cfg

19
templates/lb/cloud-init.cfg

@ -33,6 +33,25 @@ packages:
- haproxy - haproxy
- firewalld - firewalld
# Uncomment the following lines for HTTP proxy support
#
# bootcmd:
# - |
# cloud-init-per once env sh -c "mkdir -p /etc/systemd/system/cloud-config.service.d &&
# mkdir -p /etc/systemd/system/cloud-final.service.d && { cat > /etc/cloud/env <<-EOF
# http_proxy=http://admin.itix.lab:3128
# https_proxy=http://admin.itix.lab:3128
# EOF
# } && { cat > /etc/systemd/system/cloud-config.service.d/override.conf <<-EOF
# [Service]
# EnvironmentFile=/etc/cloud/env
# EOF
# } && { cat > /etc/systemd/system/cloud-final.service.d/override.conf <<-EOF
# [Service]
# EnvironmentFile=/etc/cloud/env
# EOF
# } && systemctl daemon-reload"
runcmd: runcmd:
# Enable KVM virsh console access # Enable KVM virsh console access
- [ "systemctl", "enable", "serial-getty@ttyS0.service" ] - [ "systemctl", "enable", "serial-getty@ttyS0.service" ]

17
templates/storage/cloud-init.cfg

@ -47,6 +47,23 @@ packages:
- firewalld - firewalld
- nfs-utils - nfs-utils
bootcmd:
- |
cloud-init-per once env sh -c "mkdir -p /etc/systemd/system/cloud-config.service.d &&
mkdir -p /etc/systemd/system/cloud-final.service.d && { cat > /etc/cloud/env <<-EOF
http_proxy=http://192.168.48.2:3128
https_proxy=http://192.168.48.2:3128
EOF
} && { cat > /etc/systemd/system/cloud-config.service.d/override.conf <<-EOF
[Service]
EnvironmentFile=/etc/cloud/env
EOF
} && { cat > /etc/systemd/system/cloud-final.service.d/override.conf <<-EOF
[Service]
EnvironmentFile=/etc/cloud/env
EOF
} && systemctl daemon-reload"
runcmd: runcmd:
# Enable KVM virsh console access # Enable KVM virsh console access
- [ "systemctl", "enable", "serial-getty@ttyS0.service" ] - [ "systemctl", "enable", "serial-getty@ttyS0.service" ]

Loading…
Cancel
Save