diff --git a/test/integration/targets/certificate_complete_chain/meta/main.yml b/test/integration/targets/certificate_complete_chain/meta/main.yml new file mode 100644 index 00000000000..1810d4bec98 --- /dev/null +++ b/test/integration/targets/certificate_complete_chain/meta/main.yml @@ -0,0 +1,2 @@ +dependencies: + - setup_remote_tmp_dir diff --git a/test/integration/targets/certificate_complete_chain/tasks/main.yml b/test/integration/targets/certificate_complete_chain/tasks/main.yml index 9fed94c2d55..95a1d0514b3 100644 --- a/test/integration/targets/certificate_complete_chain/tasks/main.yml +++ b/test/integration/targets/certificate_complete_chain/tasks/main.yml @@ -4,12 +4,27 @@ register: cryptography_version - block: + - name: Archive test files + archive: + path: "{{ role_path }}/files/" + dest: "{{ output_dir }}/files.tgz" + + - name: Create temporary directory to store files + file: + state: directory + path: "{{ remote_tmp_dir }}/files/" + + - name: Unarchive test files on testhost + unarchive: + src: "{{ output_dir }}/files.tgz" + dest: "{{ remote_tmp_dir }}/files/" + # Cert 1: certificate for www.ansible.com, retrieved on 2018-08-15 - name: Find root for cert 1 certificate_complete_chain: input_chain: "{{ lookup('file', 'cert1-fullchain.pem', rstrip=False) }}" root_certificates: - - "{{ role_path }}/files/roots/" + - "{{ remote_tmp_dir }}/files/roots/" register: cert1_root - name: Verify root for cert 1 assert: @@ -21,9 +36,9 @@ certificate_complete_chain: input_chain: "{{ lookup('file', 'cert1.pem', rstrip=False) }}" intermediate_certificates: - - "{{ role_path }}/files/cert1-chain.pem" + - "{{ remote_tmp_dir }}/files/cert1-chain.pem" root_certificates: - - "{{ role_path }}/files/roots.pem" + - "{{ remote_tmp_dir }}/files/roots.pem" register: cert1_rootchain - name: Verify rootchain for cert 1 assert: @@ -38,7 +53,7 @@ certificate_complete_chain: input_chain: "{{ lookup('file', 'cert2-fullchain.pem', rstrip=False) }}" root_certificates: - - "{{ role_path }}/files/roots/" + - "{{ remote_tmp_dir }}/files/roots/" register: cert2_root - name: Verify root for cert 2 assert: @@ -50,9 +65,9 @@ certificate_complete_chain: input_chain: "{{ lookup('file', 'cert2.pem', rstrip=False) }}" intermediate_certificates: - - "{{ role_path }}/files/cert2-chain.pem" + - "{{ remote_tmp_dir }}/files/cert2-chain.pem" root_certificates: - - "{{ role_path }}/files/roots.pem" + - "{{ remote_tmp_dir }}/files/roots.pem" register: cert2_rootchain - name: Verify rootchain for cert 2 assert: @@ -68,9 +83,9 @@ # Remove line ending, make sure it is re-added by code input_chain: "{{ lookup('file', 'cert2.pem', rstrip=True) }}" intermediate_certificates: - - "{{ role_path }}/files/cert2-altchain.pem" + - "{{ remote_tmp_dir }}/files/cert2-altchain.pem" root_certificates: - - "{{ role_path }}/files/roots.pem" + - "{{ remote_tmp_dir }}/files/roots.pem" register: cert2_rootchain_alt - name: Verify rootchain for cert 2 assert: diff --git a/test/integration/targets/service/tasks/systemd_setup.yml b/test/integration/targets/service/tasks/systemd_setup.yml index eb944e6f601..a9170a387d4 100644 --- a/test/integration/targets/service/tasks/systemd_setup.yml +++ b/test/integration/targets/service/tasks/systemd_setup.yml @@ -1,5 +1,5 @@ - name: install the systemd unit file - copy: src=ansible.systemd dest=/etc/systemd/system/ansible_test.service + copy: src=ansible.systemd dest=/etc/systemd/system/ansible_test.service mode=0644 register: install_systemd_result - name: install a broken systemd unit file