cancel
Showing results for 
Search instead for 
Did you mean: 
rigin
Cadet
Cadet
  • 273 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
  • 230 Views

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

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
Reply
Loading...
Join the discussion
You must log in to join this conversation.