Merge "Use User and Group variables instead of sudo"
This commit is contained in:
commit
d09647f853
ansible/roles/octavia
@ -67,11 +67,12 @@
|
||||
dest: /etc/systemd/system/octavia-interface.service
|
||||
register: octavia_interface
|
||||
|
||||
- name: Reload octavia-interface.service if required
|
||||
- name: Restart octavia-interface.service if required
|
||||
become: True
|
||||
systemd:
|
||||
name: octavia-interface
|
||||
daemon_reload: yes
|
||||
state: restarted
|
||||
when: octavia_interface.changed
|
||||
|
||||
- name: Enable and start octavia-interface.service
|
||||
|
@ -5,10 +5,12 @@ After=docker.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
User=root
|
||||
Group=root
|
||||
RemainAfterExit=true
|
||||
ExecStartPre=/usr/bin/sudo /sbin/ip link set dev {{ octavia_network_interface }} address {{ port_info.port.mac_address }}
|
||||
ExecStart=/usr/bin/sudo /sbin/dhclient -v {{ octavia_network_interface }} -cf /etc/dhcp/octavia-dhclient.conf
|
||||
ExecStop=/usr/bin/sudo /sbin/dhclient -r {{ octavia_network_interface }}
|
||||
ExecStartPre=/sbin/ip link set dev {{ octavia_network_interface }} address {{ port_info.port.mac_address }}
|
||||
ExecStart=/sbin/dhclient -v {{ octavia_network_interface }} -cf /etc/dhcp/octavia-dhclient.conf
|
||||
ExecStop=/sbin/dhclient -r {{ octavia_network_interface }}
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
Loading…
x
Reference in New Issue
Block a user