osops-tools-contrib/ansible/lampstack/roles/common/tasks/main.yml

20 lines
585 B
YAML

---
- name: Wait until server is up and runnning
local_action: wait_for port=22 host="{{ ansible_ssh_host | default(inventory_hostname) }}" search_regex=OpenSSH delay=10
become: no
- name: Check if running on Fedora
raw: "[ -f /etc/fedora-release ]"
register: fedora_release
ignore_errors: yes
- name: Install python2 for Ansible
raw: dnf install -y python2 python2-dnf libselinux-python
register: result
until: result|success
when: fedora_release.rc == 0
- name: Set SELinux to permisive
selinux: policy=targeted state=permissive
when: fedora_release.rc == 0