diff --git a/tests/integration/targets/setup_controller/tasks/fake_root.yml b/tests/integration/targets/setup_controller/tasks/fake_root.yml new file mode 100644 index 0000000..49531b8 --- /dev/null +++ b/tests/integration/targets/setup_controller/tasks/fake_root.yml @@ -0,0 +1,11 @@ +--- + +- name: "{{ role_name }} | Fake root | Ensure folder" + ansible.builtin.file: + path: "{{ playbook_dir }}/root" + state: directory + +- name: "{{ role_name }} | Fake root | Ensure default file exists" + ansible.builtin.file: + path: "{{ playbook_dir }}/root/.my.cnf" + state: touch diff --git a/tests/integration/targets/setup_controller/tasks/install.yml b/tests/integration/targets/setup_controller/tasks/install.yml deleted file mode 100644 index e288983..0000000 --- a/tests/integration/targets/setup_controller/tasks/install.yml +++ /dev/null @@ -1,21 +0,0 @@ ---- - -# - name: "{{ role_name }} | install | Required package for testing" -# ansible.builtin.apt: -# name: -# - iproute2 # To grab docker network gateway address -# - python3-cryptography # To authenticate with MySQL 8+ -# state: present -# update_cache: true -# environment: -# DEBIAN_FRONTEND: noninteractive - -- name: "{{ role_name }} | install | Ensure fake root folder" - ansible.builtin.file: - path: "{{ playbook_dir }}/root" - state: directory - -- name: "{{ role_name }} | install | Ensure fake root default file exists" - ansible.builtin.file: - path: "{{ playbook_dir }}/root/.my.cnf" - state: touch diff --git a/tests/integration/targets/setup_controller/tasks/main.yml b/tests/integration/targets/setup_controller/tasks/main.yml index d895480..0d5e36b 100644 --- a/tests/integration/targets/setup_controller/tasks/main.yml +++ b/tests/integration/targets/setup_controller/tasks/main.yml @@ -4,9 +4,9 @@ # and should not be used as examples of how to write Ansible roles # #################################################################### -- name: Prepare the controller python and MySQL connector +- name: Prepare the fake root folder ansible.builtin.import_tasks: - file: install.yml + file: fake_root.yml # setvars.yml requires the iproute2 package installed by install.yml - name: Set variables