33 lines
1.3 KiB
YAML
Executable File
33 lines
1.3 KiB
YAML
Executable File
---
|
|
- name: Enable EPEL
|
|
yum: name=epel-release
|
|
|
|
- name: Install newer java repo
|
|
command: cd /etc/yum.repos.d && curl -O https://copr.fedorainfracloud.org/coprs/g/spacewalkproject/java-packages/repo/epel-7/group_spacewalkproject-java-packages-epel-7.repo
|
|
|
|
- name: Install Spacewalk repository
|
|
yum: name=http://yum.spacewalkproject.org/2.7/RHEL/{{ansible_distribution_major_version}}/x86_64/spacewalk-repo-2.7-2.el{{ansible_distribution_major_version}}.noarch.rpm
|
|
|
|
- name: Install Spacewalk-setup-postgresql
|
|
yum: name=spacewalk-setup-postgresql state=present
|
|
|
|
- name: Ensure hostname in /etc/hosts
|
|
lineinfile: dest=/etc/hosts regexp=^{{ansible_default_ipv4.address}} line="{{ansible_default_ipv4.address}} spacewalk-test"
|
|
|
|
- name: Install spacewalk-postgresql
|
|
yum: name=spacewalk-postgresql state=present
|
|
|
|
- name: Copy answers file for spacewalk setip
|
|
template: src=answers.j2 dest=/var/tmp/answers owner=root group=root mode=0600
|
|
|
|
- name: run initdb first as a workarpound, see https://bugzilla.redhat.com/show_bug.cgi?id=1524221
|
|
command: postgresql-setup initdb
|
|
|
|
- name: Install spacewalk
|
|
command: spacewalk-setup --answer-file=/var/tmp/answers
|
|
creates=/var/satellite
|
|
|
|
- template: src=iptables.j2 dest=/etc/sysconfig/iptables owner=root group=root mode=0600
|
|
notify: restart_iptables
|
|
|