From 965a23778b0d9e844e8580de924c21cc628810e6 Mon Sep 17 00:00:00 2001 From: Mischa ter Smitten Date: Thu, 31 Aug 2023 13:12:29 +0200 Subject: [PATCH] WIP --- molecule/default/converge.yml | 2 +- molecule/default/prepare.yml | 4 ++-- tasks/main.yml | 4 ++-- tests/tasks/pre.yml | 4 ++-- tests/test.yml | 4 ++-- tests/vagrant.yml | 4 ++-- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/molecule/default/converge.yml b/molecule/default/converge.yml index 44670e5..8cf3207 100644 --- a/molecule/default/converge.yml +++ b/molecule/default/converge.yml @@ -4,7 +4,7 @@ become: true pre_tasks: - name: include variables - include_vars: "{{ item }}" + ansible.builtin.include_vars: "{{ item }}" with_first_found: - "{{ playbook_dir }}/../../tests/vars/_{{ ansible_distribution_release }}.yml" - "{{ playbook_dir }}/../../tests/vars/_{{ ansible_distribution | lower }}.yml" diff --git a/molecule/default/prepare.yml b/molecule/default/prepare.yml index db1ccc8..64975a3 100644 --- a/molecule/default/prepare.yml +++ b/molecule/default/prepare.yml @@ -4,10 +4,10 @@ become: true pre_tasks: - name: include variables - include_vars: "{{ item }}" + ansible.builtin.include_vars: "{{ item }}" with_first_found: - "{{ playbook_dir }}/../../tests/vars/_{{ ansible_distribution_release }}.yml" - "{{ playbook_dir }}/../../tests/vars/_{{ ansible_distribution | lower }}.yml" - "{{ playbook_dir }}/../../tests/vars/_default.yml" - name: include tasks - include: "{{ playbook_dir }}/../../tests/tasks/pre.yml" + ansible.builtin.include: "{{ playbook_dir }}/../../tests/tasks/pre.yml" diff --git a/tasks/main.yml b/tasks/main.yml index 5f4c8a9..85673fe 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,7 +1,7 @@ # tasks file --- - name: install dependencies - apt: + ansible.builtin.apt: name: "{{ virtualenv_dependencies }}" state: "{{ apt_install_state | default('latest') }}" update_cache: true @@ -13,7 +13,7 @@ - virtualenv-install-dependencies - name: install - pip: + ansible.builtin.pip: name: "{{ virtualenv_pip_dependencies }}" state: latest executable: "pip{{ virtualenv_python_version_major | string }}" diff --git a/tests/tasks/pre.yml b/tests/tasks/pre.yml index e3f6f1d..75d671d 100644 --- a/tests/tasks/pre.yml +++ b/tests/tasks/pre.yml @@ -1,7 +1,7 @@ # pre test file --- - name: install dependencies - apt: + ansible.builtin.apt: name: - "python{{ virtualenv_python_version_major is version('3', '>=') | ternary('3', '') }}" - curl @@ -10,7 +10,7 @@ cache_valid_time: "{{ apt_update_cache_valid_time | default(3600) }}" - name: install pip # noqa command-instead-of-module - shell: > + ansible.builtin.shell: > curl -sL {{ virtualenv_get_pip_url }} | python{{ virtualenv_python_version_major | string }} - changed_when: false tags: diff --git a/tests/test.yml b/tests/test.yml index 4eb8b22..e978481 100644 --- a/tests/test.yml +++ b/tests/test.yml @@ -5,13 +5,13 @@ become: true pre_tasks: - name: include variables - include_vars: "{{ item }}" + ansible.builtin.include_vars: "{{ item }}" with_first_found: - "{{ playbook_dir }}/vars/_{{ ansible_distribution_release }}.yml" - "{{ playbook_dir }}/vars/_{{ ansible_distribution | lower }}.yml" - "{{ playbook_dir }}/vars/_default.yml" - name: include tasks - include: "{{ playbook_dir }}/tasks/pre.yml" + ansible.builtin.import_tasks: "{{ playbook_dir }}/tasks/pre.yml" roles: - ../../ # vars: diff --git a/tests/vagrant.yml b/tests/vagrant.yml index 9acfb30..28301e7 100644 --- a/tests/vagrant.yml +++ b/tests/vagrant.yml @@ -5,12 +5,12 @@ become: true pre_tasks: - name: include variables - include_vars: "{{ item }}" + ansible.builtin.include_vars: "{{ item }}" with_first_found: - "{{ playbook_dir }}/vars/_{{ ansible_distribution_release }}.yml" - "{{ playbook_dir }}/vars/_{{ ansible_distribution | lower }}.yml" - "{{ playbook_dir }}/vars/_default.yml" - name: include tasks - include: "{{ playbook_dir }}/tasks/pre.yml" + ansible.builtin.import_tasks: "{{ playbook_dir }}/tasks/pre.yml" roles: - ../../