cancel
Showing results for 
Search instead for 
Did you mean: 
rigin
Cadet
Cadet
  • 6,013 Views

Is there anyway in Ansible playbook to start multiple services in a single module / task ?

Is there anyway in Ansible playbook to start multiple services in a single module / task ?

0 Kudos
1 Reply
Inano
Cadet
Cadet
  • 5,970 Views

Hi, Maybe you can made a loop in your task ?

- name: service activation 
  service: 
    name: {{ item }} 
    state: started 
    enabled: yes 
  with_item: 
    - httpd 
    - ssh 
    - ...
0 Kudos
Join the discussion
You must log in to join this conversation.