]> git.apps.os.sepia.ceph.com Git - ceph-cm-ansible.git/commitdiff
Make rhel 7.0 tasks run on any rhel 7.x version.
authorAndrew Schoen <aschoen@redhat.com>
Tue, 12 May 2015 20:02:04 +0000 (15:02 -0500)
committerAndrew Schoen <aschoen@redhat.com>
Tue, 12 May 2015 20:02:04 +0000 (15:02 -0500)
This shouldn't have been restricted to only 7.0 in the first place. We
noticed this problem while testing rhel 7.1 and noticing that firewalld
was not disabled.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
roles/testnode/tasks/redhat/rhel_7.0.yml [deleted file]
roles/testnode/tasks/redhat/rhel_7.yml [new file with mode: 0644]
roles/testnode/tasks/setup-redhat.yml

diff --git a/roles/testnode/tasks/redhat/rhel_7.0.yml b/roles/testnode/tasks/redhat/rhel_7.0.yml
deleted file mode 100644 (file)
index df7e752..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
----
-- include: ../nfs.yml
-  tags:
-    - nfs
-
-- name: Stop firewalld
-  service:
-    name: firewalld
-    state: stopped
-
-
-- name: Get hostname.
-  command: hostname
-  register: existing_hostname
-  changed_when: false
-
-- name: Remove lab domain from hostname.
-  shell: hostname | cut -d'.' -f1
-  register: new_hostname
-  when: existing_hostname is defined and
-        existing_hostname.stdout.find("{{ lab_domain | mandatory }}") != -1
-
-- name: Set hostname.
-  hostname:
-     name: "{{ new_hostname.stdout }}"
-  when: existing_hostname is defined and
-        existing_hostname.stdout.find("{{ lab_domain | mandatory }}") != -1
-
-# Install and configure cpan and Amazon::S3
-- include: ../cpan.yml
-  tags:
-    - cpan
diff --git a/roles/testnode/tasks/redhat/rhel_7.yml b/roles/testnode/tasks/redhat/rhel_7.yml
new file mode 100644 (file)
index 0000000..df7e752
--- /dev/null
@@ -0,0 +1,32 @@
+---
+- include: ../nfs.yml
+  tags:
+    - nfs
+
+- name: Stop firewalld
+  service:
+    name: firewalld
+    state: stopped
+
+
+- name: Get hostname.
+  command: hostname
+  register: existing_hostname
+  changed_when: false
+
+- name: Remove lab domain from hostname.
+  shell: hostname | cut -d'.' -f1
+  register: new_hostname
+  when: existing_hostname is defined and
+        existing_hostname.stdout.find("{{ lab_domain | mandatory }}") != -1
+
+- name: Set hostname.
+  hostname:
+     name: "{{ new_hostname.stdout }}"
+  when: existing_hostname is defined and
+        existing_hostname.stdout.find("{{ lab_domain | mandatory }}") != -1
+
+# Install and configure cpan and Amazon::S3
+- include: ../cpan.yml
+  tags:
+    - cpan
index e37488d00cfdcfb5ce6370dc0f594f7e23333976..cf0789352d81c99642b7ff97b015c5b355c62c14 100644 (file)
@@ -1,8 +1,8 @@
 ---
 
-- name: Include rhel 7.0 specific tasks.
-  include: redhat/rhel_7.0.yml
-  when: ansible_distribution_version == "7.0"
+- name: Include rhel 7.x specific tasks.
+  include: redhat/rhel_7.yml
+  when: ansible_distribution_major_version == "7"
 
 - name: Include rhel 6.x specific tasks.
   include: redhat/rhel_6.yml