application modules in ansible code example
Example: ansible package
- name: install ntpdate
package:
name: ntpdate
state: present
# This uses a variable as this changes per distribution.
- name: remove the apache package
package:
name: "{{ apache }}"
state: absent
- name: install the latest version of Apache and MariaDB
package:
name:
- httpd
- mariadb-server
state: latest