diff --git a/test/integration/targets/postgresql/aliases b/test/integration/targets/postgresql/aliases index 57a7cd8e893..8c690a8600b 100644 --- a/test/integration/targets/postgresql/aliases +++ b/test/integration/targets/postgresql/aliases @@ -1,5 +1,4 @@ destructive -needs/privileged posix/ci/group1 postgresql_db postgresql_privs diff --git a/test/integration/targets/setup_postgresql_db/tasks/main.yml b/test/integration/targets/setup_postgresql_db/tasks/main.yml index 351e5c89589..303fef3e459 100644 --- a/test/integration/targets/setup_postgresql_db/tasks/main.yml +++ b/test/integration/targets/setup_postgresql_db/tasks/main.yml @@ -1,10 +1,20 @@ +- name: python 2 + set_fact: + python_suffix: "" + when: ansible_python_version | version_compare('3', '<') + +- name: python 3 + set_fact: + python_suffix: "-py3" + when: ansible_python_version | version_compare('3', '>=') + - include_vars: '{{ item }}' with_first_found: - files: - - '{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yml' - - '{{ ansible_distribution }}-{{ ansible_distribution_version }}.yml' - - '{{ ansible_os_family }}.yml' - - 'default.yml' + - '{{ ansible_distribution }}-{{ ansible_distribution_major_version }}{{ python_suffix }}.yml' + - '{{ ansible_distribution }}-{{ ansible_distribution_version }}{{ python_suffix }}.yml' + - '{{ ansible_os_family }}{{ python_suffix }}.yml' + - 'default{{ python_suffix }}.yml' paths: '../vars' # Make sure we start fresh diff --git a/test/integration/targets/setup_postgresql_db/vars/Ubuntu-16-py3.yml b/test/integration/targets/setup_postgresql_db/vars/Ubuntu-16-py3.yml new file mode 100644 index 00000000000..1c5fd353dc2 --- /dev/null +++ b/test/integration/targets/setup_postgresql_db/vars/Ubuntu-16-py3.yml @@ -0,0 +1,10 @@ +postgresql_service: "postgresql" + +postgresql_packages: + - "postgresql" + - "postgresql-common" + - "python3-psycopg2" + +pg_hba_location: "/etc/postgresql/9.5/main/pg_hba.conf" +pg_dir: "/var/lib/postgresql/9.5/main" +pg_ver: 9.5