---

- hosts: overcloud-controllers
  tasks:
  - name: Update dhcp_agent configuration file option 'dhcp_renewal_time'
    ini_file:
      path=/var/lib/config-data/puppet-generated/neutron/etc/neutron/dhcp_agent.ini
      section=DEFAULT
      backup=yes
      option=dhcp_renewal_time
      value={{ renewal_time }}
      create=no
    ignore_errors: yes

  - block:
    - name: Restart neutron dhcp agent
      shell:
        podman restart $(podman ps --filter "name=neutron_dhcp" --format {% raw %}"{{.ID}}"{% endraw %})
      ignore_errors: yes
