Use systemd module instead of shell
Using ansible systemd module to daemon reload and service reload is the solution for the future. Change-Id: Ie532a7892e12c9d869883d49e5d0e2fabcc05f65
This commit is contained in:
parent
8f8b239b3c
commit
441a4918b8
@ -12,15 +12,10 @@
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
- name: Reload systemd daemon
|
||||
command: "systemctl daemon-reload"
|
||||
notify:
|
||||
- Restart glance services
|
||||
|
||||
- name: Restart glance services
|
||||
service:
|
||||
systemd:
|
||||
name: "{{ item.value.service_name }}"
|
||||
state: "restarted"
|
||||
daemon_reload: yes
|
||||
with_dict: "{{ glance_services }}"
|
||||
when: inventory_hostname in groups[item.value.group]
|
||||
|
@ -63,4 +63,4 @@
|
||||
with_dict: "{{ glance_services }}"
|
||||
when: inventory_hostname in groups[item.value.group]
|
||||
notify:
|
||||
- Reload systemd daemon
|
||||
- Restart glance services
|
||||
|
Loading…
Reference in New Issue
Block a user