openshift-ansible.spec 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. # %commit is intended to be set by tito custom builders provided
  2. # in the .tito/lib directory. The values in this spec file will not be kept up to date.
  3. %{!?commit:
  4. %global commit c64d09e528ca433832c6b6e6f5c7734a9cc8ee6f
  5. }
  6. Name: openshift-ansible
  7. Version: 3.0.2
  8. Release: 1%{?dist}
  9. Summary: Openshift and Atomic Enterprise Ansible
  10. License: ASL 2.0
  11. URL: https://github.com/openshift/openshift-ansible
  12. Source0: https://github.com/openshift/openshift-ansible/archive/%{commit}/%{name}-%{version}.tar.gz
  13. BuildArch: noarch
  14. Requires: ansible
  15. %description
  16. Openshift and Atomic Enterprise Ansible
  17. This repo contains Ansible code and playbooks
  18. for Openshift and Atomic Enterprise.
  19. %prep
  20. %setup -q
  21. %build
  22. %install
  23. # Base openshift-ansible install
  24. mkdir -p %{buildroot}%{_datadir}/%{name}
  25. mkdir -p %{buildroot}%{_datadir}/ansible/%{name}
  26. mkdir -p %{buildroot}%{_datadir}/ansible_plugins
  27. # openshift-ansible-bin install
  28. mkdir -p %{buildroot}%{_bindir}
  29. mkdir -p %{buildroot}%{python_sitelib}/openshift_ansible
  30. mkdir -p %{buildroot}/etc/bash_completion.d
  31. mkdir -p %{buildroot}/etc/openshift_ansible
  32. cp -p bin/{ossh,oscp,opssh,opscp,ohi} %{buildroot}%{_bindir}
  33. cp -pP bin/openshift_ansible/* %{buildroot}%{python_sitelib}/openshift_ansible
  34. cp -p bin/ossh_bash_completion %{buildroot}/etc/bash_completion.d
  35. cp -p bin/openshift_ansible.conf.example %{buildroot}/etc/openshift_ansible/openshift_ansible.conf
  36. # Fix links
  37. rm -f %{buildroot}%{python_sitelib}/openshift_ansible/multi_ec2.py
  38. rm -f %{buildroot}%{python_sitelib}/openshift_ansible/aws
  39. ln -sf %{_datadir}/ansible/inventory/multi_ec2.py %{buildroot}%{python_sitelib}/openshift_ansible/multi_ec2.py
  40. ln -sf %{_datadir}/ansible/inventory/aws %{buildroot}%{python_sitelib}/openshift_ansible/aws
  41. # openshift-ansible-docs install
  42. # -docs are currently just %doc, no install needed
  43. # openshift-ansible-inventory install
  44. mkdir -p %{buildroot}/etc/ansible
  45. mkdir -p %{buildroot}%{_datadir}/ansible/inventory
  46. mkdir -p %{buildroot}%{_datadir}/ansible/inventory/aws
  47. mkdir -p %{buildroot}%{_datadir}/ansible/inventory/gce
  48. cp -p inventory/multi_ec2.py %{buildroot}%{_datadir}/ansible/inventory
  49. cp -p inventory/multi_ec2.yaml.example %{buildroot}/etc/ansible/multi_ec2.yaml
  50. cp -p inventory/aws/hosts/ec2.py %{buildroot}%{_datadir}/ansible/inventory/aws
  51. cp -p inventory/gce/hosts/gce.py %{buildroot}%{_datadir}/ansible/inventory/gce
  52. # openshift-ansible-playbooks install
  53. cp -rp playbooks %{buildroot}%{_datadir}/ansible/%{name}/
  54. # openshift-ansible-roles install
  55. cp -rp roles %{buildroot}%{_datadir}/ansible/%{name}/
  56. # openshift-ansible-filter-plugins install
  57. cp -rp filter_plugins %{buildroot}%{_datadir}/ansible_plugins/
  58. # openshift-ansible-lookup-plugins install
  59. cp -rp lookup_plugins %{buildroot}%{_datadir}/ansible_plugins/
  60. # Base openshift-ansible files
  61. %files
  62. %doc LICENSE.md README*
  63. %dir %{_datadir}/ansible/%{name}
  64. # ----------------------------------------------------------------------------------
  65. # openshift-ansible-bin subpackage
  66. # ----------------------------------------------------------------------------------
  67. %package bin
  68. Summary: Openshift and Atomic Enterprise Ansible Scripts for working with metadata hosts
  69. Requires: %{name}-inventory
  70. Requires: python2
  71. BuildRequires: python2-devel
  72. BuildArch: noarch
  73. %description bin
  74. Scripts to make it nicer when working with hosts that are defined only by metadata.
  75. %files bin
  76. %{_bindir}/*
  77. %{python_sitelib}/openshift_ansible/
  78. /etc/bash_completion.d/*
  79. %config(noreplace) /etc/openshift_ansible/
  80. # ----------------------------------------------------------------------------------
  81. # openshift-ansible-docs subpackage
  82. # ----------------------------------------------------------------------------------
  83. %package docs
  84. Summary: Openshift and Atomic Enterprise Ansible documents
  85. Requires: %{name}
  86. BuildArch: noarch
  87. %description docs
  88. %{summary}.
  89. %files docs
  90. %doc docs
  91. # ----------------------------------------------------------------------------------
  92. # openshift-ansible-inventory subpackage
  93. # ----------------------------------------------------------------------------------
  94. %package inventory
  95. Summary: Openshift and Atomic Enterprise Ansible Inventories
  96. Requires: python2
  97. BuildArch: noarch
  98. %description inventory
  99. Ansible Inventories used with the openshift-ansible scripts and playbooks.
  100. %files inventory
  101. %config(noreplace) /etc/ansible/*
  102. %dir %{_datadir}/ansible/inventory
  103. %{_datadir}/ansible/inventory/multi_ec2.py*
  104. %{_datadir}/ansible/inventory/aws/ec2.py*
  105. %{_datadir}/ansible/inventory/gce/gce.py*
  106. # ----------------------------------------------------------------------------------
  107. # openshift-ansible-playbooks subpackage
  108. # ----------------------------------------------------------------------------------
  109. %package playbooks
  110. Summary: Openshift and Atomic Enterprise Ansible Playbooks
  111. Requires: %{name}
  112. BuildArch: noarch
  113. %description playbooks
  114. %{summary}.
  115. %files playbooks
  116. %{_datadir}/ansible/%{name}/playbooks
  117. # ----------------------------------------------------------------------------------
  118. # openshift-ansible-roles subpackage
  119. # ----------------------------------------------------------------------------------
  120. %package roles
  121. Summary: Openshift and Atomic Enterprise Ansible roles
  122. Requires: %{name}
  123. BuildArch: noarch
  124. %description roles
  125. %{summary}.
  126. %files roles
  127. %{_datadir}/ansible/%{name}/roles
  128. # ----------------------------------------------------------------------------------
  129. # openshift-ansible-filter-plugins subpackage
  130. # ----------------------------------------------------------------------------------
  131. %package filter-plugins
  132. Summary: Openshift and Atomic Enterprise Ansible filter plugins
  133. Requires: %{name}
  134. BuildArch: noarch
  135. %description filter-plugins
  136. %{summary}.
  137. %files filter-plugins
  138. %{_datadir}/ansible_plugins/filter_plugins
  139. # ----------------------------------------------------------------------------------
  140. # openshift-ansible-lookup-plugins subpackage
  141. # ----------------------------------------------------------------------------------
  142. %package lookup-plugins
  143. Summary: Openshift and Atomic Enterprise Ansible lookup plugins
  144. Requires: %{name}
  145. BuildArch: noarch
  146. %description lookup-plugins
  147. %{summary}.
  148. %files lookup-plugins
  149. %{_datadir}/ansible_plugins/lookup_plugins
  150. %changelog
  151. * Mon Oct 19 2015 Troy Dawson <tdawson@redhat.com> 3.0.2-1
  152. - Initial Package