- hosts: ec2 remote_user: root #become: yes strategy: free serial: - "50%" vars: ansible_port: 22 ansible_user: ec2-user ansible_ssh_private_key_file: /Users/Keys/ansible_lnd_key.pem tasks: - name: Install Apache yum: name: httpd state: installed - name: Remove Apache yum: name: httpd state: removed