diff --git a/Dockerfile-canary b/Dockerfile-canary index 522b1a3..777b397 100644 --- a/Dockerfile-canary +++ b/Dockerfile-canary @@ -42,12 +42,8 @@ RUN git clone https://github.com/ansible/ansible-kubernetes-modules.git /etc/ans RUN git clone https://github.com/ansibleplaybookbundle/ansible-asb-modules.git /etc/ansible/roles/ansibleplaybookbundle.asb-modules -RUN echo "localhost ansible_connection=local" > /etc/ansible/hosts \ - && echo '[defaults]' > /etc/ansible/ansible.cfg \ - && echo 'roles_path = /opt/ansible/roles' >> /etc/ansible/ansible.cfg \ - && echo 'library = /usr/share/ansible/openshift' >> /etc/ansible/ansible.cfg - COPY files/etc/ansible/* /etc/ansible/ +RUN echo 'library = /usr/share/ansible/openshift' >> /etc/ansible/ansible.cfg COPY files/usr/bin/* /usr/bin/ COPY files/opt/apb/.kube/config /opt/apb/.kube/config diff --git a/apb-base-scripts.spec b/apb-base-scripts.spec index 2b7c960..e14051f 100644 --- a/apb-base-scripts.spec +++ b/apb-base-scripts.spec @@ -4,14 +4,14 @@ %define build_timestamp %{nil} %endif -Name: apb-base-scripts -Version: 1.1.5 -Release: 1%{build_timestamp}%{?dist} -Summary: Scripts for the apb-base container image - -License: ASL 2.0 -URL: https://github.com/fusor/apb-examples -Source0: https://github.com/fusor/apb-examples/archive/%{name}-%{version}.tar.gz +Name: apb-base-scripts +Version: 1.1.5 +Release: 1%{build_timestamp}%{?dist} +Summary: Scripts for the apb-base container image + +License: ASL 2.0 +URL: https://github.com/ansibleplaybookbundle/apb-base +Source0: https://github.com/ansibleplaybookbundle/apb-base/archive/%{name}-%{version}.tar.gz BuildArch: noarch %description @@ -28,6 +28,9 @@ install -m 755 files/usr/bin/test-retrieval-init %{buildroot}%{_bindir} install -m 755 files/usr/bin/test-retrieval %{buildroot}%{_bindir} install -m 755 files/usr/bin/entrypoint.sh %{buildroot}%{_bindir} install -m 755 files/opt/apb/.kube/config %{buildroot}/opt/apb/.kube/config +install -m 755 files/etc/ansible/ansible.cfg %{buildroot}/etc/ansible/ansible.cfg +install -m 755 files/etc/ansible/hosts %{buildroot}/etc/ansible/hosts +install -m 755 files/etc/ansible/k8s.yml %{buildroot}/etc/ansible/k8s.yml %files %doc @@ -36,6 +39,9 @@ install -m 755 files/opt/apb/.kube/config %{buildroot}/opt/apb/.kube/config %{_bindir}/entrypoint.sh %dir %{_sysconfdir}/apb-secrets /opt/apb/.kube/config +%{_sysconfdir}/ansible/ansible.cfg +%{_sysconfdir}/ansible/hosts +%{_sysconfdir}/ansible/k8s.yml %changelog * Fri Feb 02 2018 David Zager 1.1.5-1 @@ -81,4 +87,3 @@ install -m 755 files/opt/apb/.kube/config %{buildroot}/opt/apb/.kube/config * Fri Aug 18 2017 Jason Montleon 1.0.1-1 - new package built with tito - diff --git a/files/etc/ansible/ansible.cfg b/files/etc/ansible/ansible.cfg index fb8e732..2847d0b 100644 --- a/files/etc/ansible/ansible.cfg +++ b/files/etc/ansible/ansible.cfg @@ -1,2 +1,6 @@ +[inventory] +enable_plugins = k8s + [defaults] roles_path = /etc/ansible/roles:/opt/ansible/roles +inventory = /etc/ansible/hosts:/etc/ansible/k8s.yml diff --git a/files/etc/ansible/k8s.yml b/files/etc/ansible/k8s.yml new file mode 100644 index 0000000..2a9face --- /dev/null +++ b/files/etc/ansible/k8s.yml @@ -0,0 +1,4 @@ +plugin: k8s +connections: + namespaces: + - {{ namespace }}