diff --git a/tasks/extensions/dev_headers.yml b/tasks/extensions/dev_headers.yml index 81360654..a3bf4918 100644 --- a/tasks/extensions/dev_headers.yml +++ b/tasks/extensions/dev_headers.yml @@ -11,10 +11,14 @@ - restart postgresql - name: PostgreSQL | Extensions | Make sure the development headers are installed | RedHat - yum: "name={{ item }} state=present update_cache=yes" + yum: + name: "{{ item }}" + state: present + update_cache: yes with_items: - "postgresql{{ postgresql_version_terse }}-libs" - "postgresql{{ postgresql_version_terse }}-devel" when: ansible_os_family == "RedHat" notify: - - restart postgresql + - restart postgresql with service + - restart postgresql with systemd diff --git a/tasks/install_yum.yml b/tasks/install_yum.yml index 396ee05d..33ec3003 100644 --- a/tasks/install_yum.yml +++ b/tasks/install_yum.yml @@ -4,9 +4,9 @@ # validate www.postgresql.org (or probably any other source). - block: - - name: PostgreSQL | Make sure the CA certificates are available + - name: PostgreSQL | Install all the required dependencies yum: - name: ca-certificates + name: ["ca-certificates","python-psycopg2", "python-pycurl", "glibc-common","epel-release","libselinux-python"] state: present - name: PostgreSQL | Add PostgreSQL repository @@ -14,13 +14,6 @@ name: "{{ postgresql_yum_repository_url }}" state: present - - name: PostgreSQL | Make sure the dependencies are installed - yum: - name: "{{ item }}" - state: present - update_cache: yes - with_items: ["python-psycopg2", "python-pycurl", "glibc-common", "libselinux-python"] - - name: PostgreSQL | Install PostgreSQL yum: name: "{{ item }}"