Migrate lf-ansible mono-install role 20/9020/1
authorThanh Ha <thanh.ha@linuxfoundation.org>
Fri, 23 Feb 2018 02:16:26 +0000 (21:16 -0500)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Fri, 23 Feb 2018 02:16:26 +0000 (21:16 -0500)
Change-Id: I524be75ee7c19ab849fc044a4802c2d52d223113
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
tasks/Debian.yml [new file with mode: 0644]
tasks/RedHat.yml [new file with mode: 0644]
tasks/main.yml

diff --git a/tasks/Debian.yml b/tasks/Debian.yml
new file mode 100644 (file)
index 0000000..3ea3141
--- /dev/null
@@ -0,0 +1,9 @@
+---
+- name: Install mono-complete and nuget
+  apt:
+    name:
+      - mono-complete
+      - nuget
+    state: present
+    update_cache: true
+  become: true
diff --git a/tasks/RedHat.yml b/tasks/RedHat.yml
new file mode 100644 (file)
index 0000000..d23e0bf
--- /dev/null
@@ -0,0 +1,25 @@
+---
+- name: Add Mono RPM Key
+  rpm_key:
+    key: http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
+    state: present
+  become: true
+
+- name: Add Mono repository
+  yum_repository:
+    name: mono-project
+    description: Mono Project CentOS repository
+    baseurl: http://download.mono-project.com/repo/centos
+    enabled: true
+    repo_gpgcheck: false
+    skip_if_unavailable: true
+  become: true
+
+- name: Install mono-complete and nuget
+  yum:
+    name:
+      - mono-complete
+      - nuget
+    state: present
+    update_cache: true
+  become: true
index 0e88341..9a6679b 100644 (file)
@@ -1,2 +1,4 @@
 ---
-# tasks file for mono-install
+- include_tasks: '{{item}}'
+  with_first_found:
+    - '{{ansible_os_family}}.yml'