You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
2.2 KiB

  1. ---
  2. #Three commands to install a service on CentOS/RedHat
  3. #wget -O - https://tendermint-packages.interblock.io/centos/7/os/x86_64/RPM-GPG-KEY-Tendermint | rpm --import -
  4. #wget -O /etc/yum.repos.d/tendermint.repo https://tendermint-packages.interblock.io/centos/7/os/x86_64/tendermint.repo
  5. #yum update && yum install basecoin
  6. #This has a bug in Ansible 2.3: https://github.com/ansible/ansible/issues/20711
  7. #- name: Add repository key on CentOS/RedHat
  8. # when: ansible_os_family == "RedHat"
  9. # rpm_key: key=https://tendermint-packages.interblock.io/centos/7/os/x86_64/RPM-GPG-KEY-Tendermint
  10. #Workaround
  11. - name: Download repository key for CentOS/RedHat
  12. when: ansible_os_family == "RedHat"
  13. get_url: "url=https://tendermint-packages.interblock.io/{{ (devops_path | default(false) | bool) | ternary('devops/','') }}centos/7/os/x86_64/RPM-GPG-KEY-Tendermint dest=/root/RPM-GPG-KEY-Tendermint force=yes checksum=sha256:a8c61d4061697d2595562c703dbafbdfdcfa7f0c75a523ac84d5609d1b444abe"
  14. - name: Import repository key for CentOS/RedHat
  15. when: ansible_os_family == "RedHat"
  16. command: "rpm --import /root/RPM-GPG-KEY-Tendermint"
  17. - name: Install tendermint repository on CentOS/RedHat
  18. when: ansible_os_family == "RedHat"
  19. yum_repository:
  20. name: tendermint
  21. baseurl: https://tendermint-packages.interblock.io/{{ (devops_path | default(false) | bool) | ternary('devops/','') }}centos/7/os/x86_64
  22. description: "Tendermint repo"
  23. gpgcheck: yes
  24. gpgkey: https://tendermint-packages.interblock.io/{{ (devops_path | default(false) | bool) | ternary('devops/','') }}centos/7/os/x86_64/RPM-GPG-KEY-Tendermint
  25. # repo_gpgcheck: yes
  26. - name: Install package on CentOS/RedHat
  27. when: ansible_os_family == "RedHat"
  28. yum: "pkg={{service}} update_cache=yes state=latest"
  29. # The below commands are required so that the tomlconfig playbook can run.
  30. - name: Install epel-release on CentOS/RedHat
  31. when: ansible_os_family == "RedHat"
  32. yum: "pkg=epel-release update_cache=yes state=latest"
  33. - name: Install pip on CentOS/RedHat
  34. when: ansible_os_family == "RedHat"
  35. yum: "pkg={{item}} state=latest"
  36. with_items:
  37. - python2-pip
  38. - python-virtualenv
  39. - unzip
  40. - tar
  41. - name: Install toml
  42. when: ansible_os_family == "RedHat"
  43. pip: name=toml