Ansible course Advanced/Project - Playbook(Q1)

The first question. the playbook to install :slight_smile:

  • python3-libselinux

  • python3-libsemanage

  • firewalld .

The playbook is failing even with the solution:

  • name: Deploy lamp stack application
    hosts: all
    become: yes
    tasks:
    • name: Install common dependencies
      yum:
      name:
      - python3-libselinux
      - python3-libsemanage
      - firewalld
      state: installed

Hello
You should change your playbook to install those packages using with_items utility in ansible

name: Install common dependencies
yum: name={{ item }} state=present
with_items:
- python3-libselinux
- python3-libsemanage
- firewalld
state: installed
1 Like

Thank You @houariabdelmouhssine. It makes sense for me. Please update your solution as well.