Browse Source

Merge "Fix upload-puppetforge role"

Zuul 3 months ago
parent
commit
e68af4b1a4
1 changed files with 29 additions and 1 deletions
  1. 29
    1
      roles/upload-puppetforge/tasks/main.yaml

+ 29
- 1
roles/upload-puppetforge/tasks/main.yaml View File

@@ -1,14 +1,42 @@
1
+- name: Install ruby dependencies on RedHat/Suse based
2
+  package:
3
+    name:
4
+      - ruby-devel
5
+      - gcc-c++
6
+      - make
7
+    state: present
8
+  when: ansible_os_family == "RedHat" or ansible_os_family == "Suse"
9
+
10
+- name: Install ruby dependencies on Debian based
11
+  package:
12
+    name:
13
+      - ruby-dev
14
+      - g++
15
+      - make
16
+    state: present
17
+  when: ansible_os_family == "Debian"
18
+
1 19
 - name: Install required gems
2 20
   gem:
3 21
     name: "{{ item }}"
22
+    user_install: no
4 23
   with_items:
5 24
     - rake
6 25
     - puppetlabs_spec_helper
7 26
     - puppet-blacksmith
8 27
 
28
+# NOTE(tobias.urdin): The build task is needed because puppet-blacksmith
29
+# doesn't provide a build task so it fails, we don't need one anyway since
30
+# we have already built the module before this role is called.
9 31
 - name: Install new Rakefile
10 32
   copy:
11
-    content: "require 'puppet_blacksmith/rake_tasks'"
33
+    content: |
34
+      namespace 'module' do
35
+        task 'build' do
36
+        end
37
+      end
38
+
39
+      require 'puppet_blacksmith/rake_tasks'
12 40
     dest: "{{ puppet_module_dir }}/Rakefile"
13 41
 
14 42
 - name: Publish puppet module

Loading…
Cancel
Save