Moved CentOS specific settings into it's own include file.

pull/63/head
Ivan Grynenko 8 years ago
parent 2b45d679d5
commit bb834d09ed
  1. 18
      lemp-rhel7/roles/common/tasks/main.yml
  2. 15
      lemp-rhel7/roles/common/tasks/setup-RedHat.yml

@ -1,18 +1,6 @@
---
- name: Copy the NGINX repository definition
copy: src=nginx.repo dest=/etc/yum.repos.d/
- name: Copy the EPEL repository definition
copy: src=epel.repo dest=/etc/yum.repos.d/
- name: Create the GPG key for NGINX
copy: src=RPM-GPG-KEY-NGINX dest=/etc/pki/rpm-gpg
- name: Create the GPG key for EPEL
copy: src=RPM-GPG-KEY-EPEL-7 dest=/etc/pki/rpm-gpg
- name: Creates custom users
user: name=vmuser comment=DefaultUser groups=vmuser,wheel password={{ default_user_password }} shell=/bin/bash createhome=yes
user: name=www-php comment=DefaultPHPUser shell=/sbin/nologin createhome=no
# Setup/install tasks.
- include: setup-RedHat.yml
when: ansible_os_family == 'RedHat'
- hostname: name={{ server_hostname }}

@ -0,0 +1,15 @@
- name: Copy the NGINX repository definition
copy: src=nginx.repo dest=/etc/yum.repos.d/
- name: Copy the EPEL repository definition
copy: src=epel.repo dest=/etc/yum.repos.d/
- name: Create the GPG key for NGINX
copy: src=RPM-GPG-KEY-NGINX dest=/etc/pki/rpm-gpg
- name: Create the GPG key for EPEL
copy: src=RPM-GPG-KEY-EPEL-7 dest=/etc/pki/rpm-gpg
- name: Creates custom users
user: name=vmuser comment=DefaultUser groups=vmuser,wheel password={{ default_user_password }} shell=/bin/bash createhome=yes
user: name=www-php comment=DefaultPHPUser shell=/sbin/nologin createhome=no