This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: test | |
tasks: | |
- name: Check OS family | |
debug: msg="This is my OS" | |
when: ansible_os_family == "Debian" | |
- name: Check if Apache2 is installed | |
command: dpkg-query -W apache2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: ensure file exists | |
copy: | |
content: "" | |
dest: /etc/nologin | |
force: no | |
group: sys | |
owner: root | |
mode: 0555 |