main.yml 7.44 KB
Newer Older
1 2 3 4 5

  - name: Check if RINA is already installed
    stat: path=/usr/bin/ipcm
    register: ipcm

6 7
  - name: Remove legacy repositories from git.erp5.org
    apt_key: id=1A716324 state=absent
Łukasz Nowak's avatar
Łukasz Nowak committed
8
    when: ansible_distribution == "Debian" and not (rina or ipcm.stat.exists)
9

10 11 12 13
  - name: Remove {{ base_open_build_url }} key (and add later) on every upgrade, as expiration date is quite short (2 months).
    apt_key: id=94A63987 state=absent
    when: ansible_distribution == "Debian"

14 15 16
  - file: path=/etc/apt/sources.list.d/re6stnet.list state=absent
    when: ansible_distribution == "Debian"

17
  - include: fedora_init.yml 
18

19 20 21 22
  - name: Install Debian 10 repository key
    apt_key: url={{ base_open_build_url }}/Debian_10.0/Release.key state=present
    when: ansible_distribution == "Debian" and ansible_distribution_major_version == "10"

23 24
  - name: Install Debian 9 repository key
    apt_key: url={{ base_open_build_url }}/Debian_9.0/Release.key state=present
25
    when: ansible_distribution == "Debian" and ansible_distribution_major_version == "9"
26

27 28 29 30 31 32 33 34 35 36 37 38
  - name: Install Debian 8 repository key
    apt_key: url={{ base_open_build_url }}/Debian_8.0/Release.key state=present
    when: ansible_distribution == "Debian" and ansible_distribution_major_version == "8"

  - name: Install Debian 7 repository key
    apt_key: url={{ base_open_build_url }}/Debian_7.0/Release.key state=present
    when: ansible_distribution == "Debian" and ansible_distribution_major_version == "7"

  - name: Install Debian 6 repository key
    apt_key: url={{ base_open_build_url }}/Debian_6.0/Release.key state=present
    when: ansible_distribution == "Debian" and ansible_distribution_major_version == "6"

39 40 41 42
  - name: Install Debian 10 repository
    apt_repository: repo='deb {{ base_open_build_url }}/Debian_10.0/ ./' state=present
    when: ansible_distribution == "Debian" and ansible_distribution_major_version == "10"

43
  - name: Install Debian 9 repository
44
    apt_repository: repo='deb {{ base_open_build_url }}/Debian_9.0/ ./' state=present
45
    when: ansible_distribution == "Debian" and ansible_distribution_major_version == "9"
46

47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
  - name: Install Debian 8 repository
    apt_repository: repo='deb {{ base_open_build_url }}/Debian_8.0/ ./' state=present
    when: ansible_distribution == "Debian" and ansible_distribution_major_version == "8"

  - name: Install Debian 7 repository
    apt_repository: repo='deb {{ base_open_build_url }}/Debian_7.0/ ./' state=present
    when: ansible_distribution == "Debian" and ansible_distribution_major_version == "7"

  - name: Install Debian 6 repository
    apt_repository: repo='deb {{ base_open_build_url }}/Debian_6.0/ ./' state=present
    when: ansible_distribution == "Debian" and ansible_distribution_major_version == "6"

  - name: Install Ubuntu 14.04 repository key
    apt_key: url={{ base_open_build_url }}/xUbuntu_14.04/Release.key state=present
    when: ansible_distribution == "Ubuntu" and ansible_distribution_version == "14.04"

  - name: Install Ubuntu 14.04 repository
    apt_repository: repo='deb {{ base_open_build_url }}/xUbuntu_14.04/ ./' state=present
    when: ansible_distribution == "Ubuntu" and ansible_distribution_version == "14.04" 

67 68 69 70 71 72 73 74
  - name: Install Ubuntu 14.04 repository key (Linuxmint 17.2)
    apt_key: url={{ base_open_build_url }}/xUbuntu_14.04/Release.key state=present
    when: ansible_distribution == "Linuxmint" and ansible_distribution_version == "17.2"

  - name: Install Ubuntu 14.04 repository (Linuxmint 17.2)
    apt_repository: repo='deb {{ base_open_build_url }}/xUbuntu_14.04/ ./' state=present
    when: ansible_distribution == "Linuxmint" and ansible_distribution_version == "17.2"

75
  - name: Install Ubuntu 15.04 repository key
Rafael Monnerat's avatar
Rafael Monnerat committed
76
    apt_key: url={{ base_open_build_url }}/xUbuntu_15.04/Release.key state=present
77 78 79 80
    when: ansible_distribution == "Ubuntu" and ansible_distribution_version == "15.04"

  - name: Install Ubuntu 15.04 repository
    apt_repository: repo='deb {{ base_open_build_url }}/xUbuntu_15.04/ ./' state=present
81 82 83 84 85 86 87 88 89
    when: ansible_distribution == "Ubuntu" and ansible_distribution_version == "15.04"

  - name: Install Ubuntu 16.04 repository key
    apt_key: url={{ base_open_build_url }}/xUbuntu_16.04/Release.key state=present
    when: ansible_distribution == "Ubuntu" and ansible_distribution_version == "16.04"

  - name: Install Ubuntu 16.04 repository
    apt_repository: repo='deb {{ base_open_build_url }}/xUbuntu_16.04/ ./' state=present
    when: ansible_distribution == "Ubuntu" and ansible_distribution_version == "16.04" 
90

91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106
  - name: Install Ubuntu 17.04 repository key
    apt_key: url={{ base_open_build_url }}/xUbuntu_17.10/Release.key state=present
    when: ansible_distribution == "Ubuntu" and ansible_distribution_version == "17.04"

  - name: Install Ubuntu 17.04 repository
    apt_repository: repo='deb {{ base_open_build_url }}/xUbuntu_17.04/ ./' state=present
    when: ansible_distribution == "Ubuntu" and ansible_distribution_version == "17.04"

  - name: Install Ubuntu 17.10 repository key
    apt_key: url={{ base_open_build_url }}/xUbuntu_17.10/Release.key state=present
    when: ansible_distribution == "Ubuntu" and ansible_distribution_version == "17.10"

  - name: Install Ubuntu 17.10 repository
    apt_repository: repo='deb {{ base_open_build_url }}/xUbuntu_17.10/ ./' state=present
    when: ansible_distribution == "Ubuntu" and ansible_distribution_version == "17.10"

107 108 109 110 111 112 113 114
  - name: Install Ubuntu 18.04 repository key
    apt_key: url={{ base_open_build_url }}/xUbuntu_18.04/Release.key state=present
    when: ansible_distribution == "Ubuntu" and ansible_distribution_version == "18.04"

  - name: Install Ubuntu 18.04 repository
    apt_repository: repo='deb {{ base_open_build_url }}/xUbuntu_18.04/ ./' state=present
    when: ansible_distribution == "Ubuntu" and ansible_distribution_version == "18.04"

115 116 117 118
  - name: Install CentOS 7 Repository
    get_url: url=http://download.opensuse.org/repositories/home:/VIFIBnexedi/CentOS_7/home:VIFIBnexedi.repo dest=/etc/yum.repos.d/slapos.repo mode=0440
    when: ansible_distribution == "CentOS" and ansible_distribution_major_version == "7"

119
  - name: Install CentOS 7 RPM Key
120 121 122
    # workarounded with https://github.com/marbu/ansible-modules-core-issue-1853-reproducer/commit/41727b465533717015d8d55904c5a102fe248bc4
    # for https://github.com/ansible/ansible-modules-core/issues/1853
    rpm_key: state=present key=roles/repository/files/VIFIBNexedi_CentOS_7.key
123
    when: ansible_distribution == "CentOS" and ansible_distribution_major_version == "7"
124 125 126 127 128 129 130

  - name: Install CentOS 6 Repository
    get_url: url=http://download.opensuse.org/repositories/home:/VIFIBnexedi/CentOS_CentOS-6/home:VIFIBnexedi.repo dest=/etc/yum.repos.d/slapos.repo mode=0440
    when: ansible_distribution == "CentOS" and ansible_distribution_major_version == "6"

  - name: Install CentOS 6 RPM Key
    rpm_key: state=present key=http://download.opensuse.org/repositories/home:/VIFIBnexedi/CentOS_CentOS-6/repodata/repomd.xml.key
131
    when: ansible_distribution == "CentOS" and ansible_distribution_major_version == "6"
132

133 134 135 136 137 138 139 140 141
  - name: Install Fedora 26 Repository
    get_url: url=http://download.opensuse.org/repositories/home:/VIFIBnexedi/Fedora_26/home:VIFIBnexedi.repo dest=/etc/yum.repos.d/slapos.repo mode=0440
    when: ansible_distribution == "Fedora" and ansible_distribution_major_version == "26"

  - name: Install Fedora 26 RPM Key
    rpm_key: state=present key=http://download.opensuse.org/repositories/home:/VIFIBnexedi/Fedora_26/repodata/repomd.xml.key
    when: ansible_distribution == "Fedora" and ansible_distribution_major_version == "26"