You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@metron.apache.org by ma...@apache.org on 2017/06/01 21:41:28 UTC

[09/44] metron git commit: METRON-840 All " ambari_*" hosts need to have a /localrepo folder closes apache/incubator-metron#563

METRON-840 All "ambari_*" hosts need to have a /localrepo folder closes apache/incubator-metron#563


Project: http://git-wip-us.apache.org/repos/asf/metron/repo
Commit: http://git-wip-us.apache.org/repos/asf/metron/commit/082b218f
Tree: http://git-wip-us.apache.org/repos/asf/metron/tree/082b218f
Diff: http://git-wip-us.apache.org/repos/asf/metron/diff/082b218f

Branch: refs/heads/Metron_0.4.0
Commit: 082b218fb80ec8049cf7143d2a1c9a1537dd41dc
Parents: e08b7d4
Author: David Lyle <dl...@gmail.com>
Authored: Tue May 9 10:49:18 2017 -0400
Committer: David Lyle <dl...@gmail.com>
Committed: Tue May 9 10:49:18 2017 -0400

----------------------------------------------------------------------
 .../roles/ambari_slave/tasks/main.yml           |  4 ++-
 .../roles/metron-rpms/tasks/copy_rpms.yml       | 26 +++++++++++++++
 .../metron-rpms/tasks/create_directory.yml      | 28 +++++++++++++++++
 .../roles/metron-rpms/tasks/create_repo.yml     | 28 +++++++++++++++++
 .../roles/metron-rpms/tasks/main.yml            | 33 ++------------------
 5 files changed, 88 insertions(+), 31 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/metron/blob/082b218f/metron-deployment/roles/ambari_slave/tasks/main.yml
----------------------------------------------------------------------
diff --git a/metron-deployment/roles/ambari_slave/tasks/main.yml b/metron-deployment/roles/ambari_slave/tasks/main.yml
index 3fcd24f..ca81a7a 100644
--- a/metron-deployment/roles/ambari_slave/tasks/main.yml
+++ b/metron-deployment/roles/ambari_slave/tasks/main.yml
@@ -15,7 +15,9 @@
 #  limitations under the License.
 #
 ---
-# tasks file for ambari_slave
+- include: ../roles/metron-rpms/tasks/create_directory.yml
+- include: ../roles/metron-rpms/tasks/create_repo.yml
+
 - name: Install ambari-agent
   yum:
     name: ambari-agent

http://git-wip-us.apache.org/repos/asf/metron/blob/082b218f/metron-deployment/roles/metron-rpms/tasks/copy_rpms.yml
----------------------------------------------------------------------
diff --git a/metron-deployment/roles/metron-rpms/tasks/copy_rpms.yml b/metron-deployment/roles/metron-rpms/tasks/copy_rpms.yml
new file mode 100644
index 0000000..3410b7f
--- /dev/null
+++ b/metron-deployment/roles/metron-rpms/tasks/copy_rpms.yml
@@ -0,0 +1,26 @@
+#
+#  Licensed to the Apache Software Foundation (ASF) under one or more
+#  contributor license agreements.  See the NOTICE file distributed with
+#  this work for additional information regarding copyright ownership.
+#  The ASF licenses this file to You under the Apache License, Version 2.0
+#  (the "License"); you may not use this file except in compliance with
+#  the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+---
+- name: Copy Metron RPMs
+  copy:
+    src: "{{ item }}"
+    dest: /localrepo
+    owner: root
+    mode: 0755
+  with_fileglob:
+    - "{{ metron_rpm_glob }}"
+

http://git-wip-us.apache.org/repos/asf/metron/blob/082b218f/metron-deployment/roles/metron-rpms/tasks/create_directory.yml
----------------------------------------------------------------------
diff --git a/metron-deployment/roles/metron-rpms/tasks/create_directory.yml b/metron-deployment/roles/metron-rpms/tasks/create_directory.yml
new file mode 100644
index 0000000..0601625
--- /dev/null
+++ b/metron-deployment/roles/metron-rpms/tasks/create_directory.yml
@@ -0,0 +1,28 @@
+#
+#  Licensed to the Apache Software Foundation (ASF) under one or more
+#  contributor license agreements.  See the NOTICE file distributed with
+#  this work for additional information regarding copyright ownership.
+#  The ASF licenses this file to You under the Apache License, Version 2.0
+#  (the "License"); you may not use this file except in compliance with
+#  the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+---
+
+- name: Clean out localrepo
+  file:
+    state: absent
+    path: /localrepo
+
+- name: Create localrepo directory
+  file:
+    path: /localrepo
+    state: directory
+    mode: 0755

http://git-wip-us.apache.org/repos/asf/metron/blob/082b218f/metron-deployment/roles/metron-rpms/tasks/create_repo.yml
----------------------------------------------------------------------
diff --git a/metron-deployment/roles/metron-rpms/tasks/create_repo.yml b/metron-deployment/roles/metron-rpms/tasks/create_repo.yml
new file mode 100644
index 0000000..e2ab00a
--- /dev/null
+++ b/metron-deployment/roles/metron-rpms/tasks/create_repo.yml
@@ -0,0 +1,28 @@
+#
+#  Licensed to the Apache Software Foundation (ASF) under one or more
+#  contributor license agreements.  See the NOTICE file distributed with
+#  this work for additional information regarding copyright ownership.
+#  The ASF licenses this file to You under the Apache License, Version 2.0
+#  (the "License"); you may not use this file except in compliance with
+#  the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+---
+- name: Install createrepo
+  package:
+    name: createrepo
+    state: installed
+
+- name: Create local repo with new packages
+  shell: "createrepo /localrepo"
+  args:
+      creates: /localrepo/repodata
+
+

http://git-wip-us.apache.org/repos/asf/metron/blob/082b218f/metron-deployment/roles/metron-rpms/tasks/main.yml
----------------------------------------------------------------------
diff --git a/metron-deployment/roles/metron-rpms/tasks/main.yml b/metron-deployment/roles/metron-rpms/tasks/main.yml
index 8ea3088..9ebb452 100644
--- a/metron-deployment/roles/metron-rpms/tasks/main.yml
+++ b/metron-deployment/roles/metron-rpms/tasks/main.yml
@@ -16,33 +16,6 @@
 #
 ---
 
-- name: Clean out localrepo
-  file:
-    state: absent
-    path: /localrepo
-
-- name: Create localrepo directory
-  file:
-    path: /localrepo
-    state: directory
-    mode: 0755
-
-- name: Copy Metron RPMs
-  copy:
-    src: "{{ item }}"
-    dest: /localrepo
-    owner: root
-    mode: 0755
-  with_fileglob:
-    - "{{ metron_rpm_glob }}"
-
-- name: Install createrepo
-  package:
-    name: createrepo
-    state: installed
-
-- name: Create local repo with new packages
-  shell: "createrepo /localrepo"
-  args:
-      creates: /localrepo/repodata
-
+- include: create_directory.yml
+- include: copy_rpms.yml
+- include: create_repo.yml