summaryrefslogtreecommitdiff
path: root/ansible-continuous-delivery/roles/install-ruby/tasks/install-ruby-rh8.yml
blob: 596db19b75f79c65dbe136c28221c6d1aae96240 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
---
- name: Add nodejs repo
  ansible.builtin.copy:
    dest: "/etc/dnf/modules.d/nodejs.module"
    content: |
      [nodejs]
      name=nodejs
      stream={{ nodejs_version }}
      profiles=
      state=enabled
    mode: 0644
    owner: root

- name: Add yarn repo
  ansible.builtin.copy:
    dest: "/etc/yum.repos.d/yarn.repo"
    content: |
      [yarn]
      name=Yarn Repository
      baseurl=https://dl.yarnpkg.com/rpm/
      enabled=1
      gpgcheck=1
      gpgkey=https://dl.yarnpkg.com/rpm/pubkey.gpg
    mode: 0644
    owner: root

- name: Import yarn GPG signature
  ansible.builtin.rpm_key:
    key: https://dl.yarnpkg.com/rpm/pubkey.gpg
  environment:
    https_proxy: "{{ https_proxy }}"

- name: Install packages
  ansible.builtin.dnf:
    update_cache: true
    state: present
    name:
      - "@ruby:2.6"
      - bison
      - bzip2
      - curl
      - gcc-c++
      - git
      - libcurl-devel
      - libffi-devel
      - libpq
      - libpq-devel
      - libtool
      - libyaml
      - make
      - nodejs
      - openssl-devel
      - patch
      - readline
      - readline-devel
      - redhat-rpm-config
      - ruby-devel
      - yarn
      - zlib
      - zlib-devel

- name: Execute gem command
  ansible.builtin.command:
    gem install bundler
  environment:
    https_proxy: "{{ https_proxy }}"
  changed_when: false
  check_mode: false
  become: true
  become_user: zextras-ci