Switch to installing collection inside tox target

Instead of working around with symbolic links, we can simply just
do the installation instead inside the tox target.

Sem-Ver: bugfix
Change-Id: Ie46b6ea0aed75f512b704e4892ab07d71db62d1a
diff --git a/doc/requirements.txt b/doc/requirements.txt
index 5a1ebd7..e796768 100644
--- a/doc/requirements.txt
+++ b/doc/requirements.txt
@@ -1,3 +1,4 @@
+ansible-core
 sphinx
 sphinx_rtd_theme
 reno[sphinx]
diff --git a/releasenotes/notes/cleanup-pre-run-cbd272c8b7852365.yaml b/releasenotes/notes/cleanup-pre-run-cbd272c8b7852365.yaml
new file mode 100644
index 0000000..5f9bb5d
--- /dev/null
+++ b/releasenotes/notes/cleanup-pre-run-cbd272c8b7852365.yaml
@@ -0,0 +1,4 @@
+---
+fixes:
+  - Drops symbolic link in pre-run and replaces it with an ``ansible-galaxy``
+    installation of the collection.
diff --git a/tox.ini b/tox.ini
index 5e6e482..5ce257a 100644
--- a/tox.ini
+++ b/tox.ini
@@ -22,6 +22,9 @@
     OS_*
     TERM
     ATMOSPHERE_*
+commands_pre =
+    python3 {toxinidir}/tools/generate-galaxy-yml.py
+    ansible-galaxy collection install -f {toxinidir}
 
 [testenv:build]
 deps =
@@ -29,7 +32,6 @@
     pbr
     pyyaml
 commands =
-    python3 {toxinidir}/tools/generate-galaxy-yml.py
     ansible-galaxy collection build --force
 
 [testenv:molecule]
diff --git a/zuul.d/jobs.yaml b/zuul.d/jobs.yaml
index d75ff4e..bcfea76 100644
--- a/zuul.d/jobs.yaml
+++ b/zuul.d/jobs.yaml
@@ -32,8 +32,6 @@
 - job:
     name: ansible-collection-atmosphere-tox-molecule
     parent: vexxhost-tox-molecule
-    pre-run:
-      - zuul.d/playbooks/ansible-collection-atmosphere-tox-molecule/pre-run.yml
     cleanup-run:
       - zuul.d/playbooks/ansible-collection-atmosphere-tox-molecule/cleanup-run.yml
     timeout: 3600
diff --git a/zuul.d/playbooks/ansible-collection-atmosphere-tox-molecule/pre-run.yml b/zuul.d/playbooks/ansible-collection-atmosphere-tox-molecule/pre-run.yml
deleted file mode 100644
index 837ba50..0000000
--- a/zuul.d/playbooks/ansible-collection-atmosphere-tox-molecule/pre-run.yml
+++ /dev/null
@@ -1,26 +0,0 @@
-# Copyright (c) 2022 VEXXHOST, Inc.
-#
-# Licensed under the Apache License, Version 2.0 (the "License"); you may
-# not use this file except in compliance with the License. You may obtain
-# a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-# License for the specific language governing permissions and limitations
-# under the License.
-
-- hosts: all
-  tasks:
-    - name: Create folder for Ansible collections
-      file:
-        path: "{{ ansible_user_dir }}/.ansible/collections/ansible_collections/vexxhost"
-        state: directory
-
-    - name: Create symbloic link to Ansible collection
-      file:
-        src: "{{ ansible_user_dir }}/{{ zuul.project.src_dir }}"
-        dest: "{{ ansible_user_dir }}/.ansible/collections/ansible_collections/vexxhost/atmosphere"
-        state: link