diff --git a/bifrost/cli.py b/bifrost/cli.py index 443933855..231519702 100644 --- a/bifrost/cli.py +++ b/bifrost/cli.py @@ -162,6 +162,7 @@ def cmd_install(args): developer_mode=args.develop, enable_prometheus_exporter=args.enable_prometheus_exporter, default_boot_mode='uefi' if args.uefi else 'bios', + include_dhcp_server=not args.disable_dhcp, extra_vars=args.extra_vars, **kwargs) log("Ironic is installed and running, try it yourself:\n", @@ -255,6 +256,8 @@ def parse_args(): help='Enable Ironic Prometheus Exporter') install.add_argument('--uefi', action='store_true', help='use UEFI by default') + install.add_argument('--disable-dhcp', action='store_true', + help='Disable integrated dhcp server') install.add_argument('-e', '--extra-vars', action='append', help='additional vars to pass to ansible') diff --git a/doc/source/install/index.rst b/doc/source/install/index.rst index eb571be4e..d1e6b1d00 100644 --- a/doc/source/install/index.rst +++ b/doc/source/install/index.rst @@ -98,6 +98,8 @@ For the machine that hosts Bifrost you'll need to figure out: #. Use the ``public`` zone by providing ``firewalld_internal_zone=public`` when installing. +* Whether to use the integrated DHCP server or an external DHCP service. + * Pool of IP addresses for DHCP (must be within the network configured on the chosen network interface). @@ -285,6 +287,10 @@ Additionally, the following parameters can be useful: ``--uefi`` Boot machines in the UEFI mode by default. +``--disable-dhcp`` + Disable the configuration of the integrated DHCP server, allowing to use + an external DHCP service. + See the built-in documentation for more details: .. code-block:: bash diff --git a/playbooks/roles/bifrost-ironic-install/defaults/main.yml b/playbooks/roles/bifrost-ironic-install/defaults/main.yml index 53249976c..240f79885 100644 --- a/playbooks/roles/bifrost-ironic-install/defaults/main.yml +++ b/playbooks/roles/bifrost-ironic-install/defaults/main.yml @@ -109,8 +109,8 @@ update_ipa: "{{ update_repos }}" ipa_add_ssh_key: false cirros_deploy_image_upstream_url: https://download.cirros-cloud.net/0.5.1/cirros-0.5.1-x86_64-disk.img # By default bifrost will deploy dnsmasq to utilize as an integrated DHCP -# server. If you already have a DHCP server, you will need to disable -# this setting, and perform manual configuration of your DHCP server. +# server. If you already have a DHCP server, you can pass --disable-dhcp +# to the bifrost-cli install command to disable it. include_dhcp_server: true # *_git_url can be overridden by local clones for offline installs dib_git_url: https://opendev.org/openstack/diskimage-builder diff --git a/releasenotes/notes/disable-dhcp-cli-6f85449c2c1316cf.yaml b/releasenotes/notes/disable-dhcp-cli-6f85449c2c1316cf.yaml new file mode 100644 index 000000000..63c3a9bce --- /dev/null +++ b/releasenotes/notes/disable-dhcp-cli-6f85449c2c1316cf.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + Adds the ``--disable-dhcp`` argument to ``./bifrost-cli install`` to + disable the integrated dhcp configuration.