Skip to content

Commit 7255caf

Browse files
authored
Merge pull request #170 from lae/feature/pg-collection-update
Clarify community.postgresql usage in docs
2 parents 7fda785 + 904ccc3 commit 7255caf

File tree

2 files changed

+20
-7
lines changed

2 files changed

+20
-7
lines changed

README.adoc

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ Provided you have Ansible installed and are using defaults:
3939
[source,bash,subs="attributes"]
4040
----
4141
ansible-galaxy install geerlingguy.postgresql davidwittman.redis {role}
42+
ansible-galaxy collection install community.postgresql
4243
ansible-playbook -i your.server.fqdn, ~/.ansible/roles/{role}/examples/playbook_single_host_deploy.yml -K
4344
----
4445

@@ -50,6 +51,7 @@ You can also use Vagrant, if you prefer, to bring up NetBox at `localhost:8080`:
5051
[source,bash,subs="attributes"]
5152
----
5253
ansible-galaxy install geerlingguy.postgresql davidwittman.redis {role}
54+
ansible-galaxy collection install community.postgresql
5355
cd ~/.ansible/roles/{role}/
5456
vagrant up
5557
----
@@ -70,12 +72,23 @@ endif::[]
7072

7173
=== PostgreSQL
7274

73-
This role does not setup a PostgreSQL server (but will create a database if
74-
needed), so you'll need to setup a PostgreSQL server and create a database user
75-
separate from this role. Take a look at the _Example Playbook_ section.
75+
This role does not setup a PostgreSQL server (but will create a database if needed), so you'll need to setup a PostgreSQL server and create a database user separate from this role.
76+
Take a look at the _Example Playbook_ section.
7677

77-
WARNING: NetBox v2.2.0+ require PostgreSQL 9.4 at the minimum, which may not be
78-
available in your distribution's repos. You may want to use a role for this.
78+
In addition, for Ansible 2.10+, you may need to install the `community.postgresql` collection.
79+
It is recommended to specify this in your playbook's `requirements.yml` file.
80+
For example:
81+
82+
[source,yaml]
83+
----
84+
---
85+
collections:
86+
- name: community.postgresql
87+
version: 3.4.0
88+
----
89+
90+
WARNING: NetBox v2.2.0+ require PostgreSQL 9.4 at the minimum, which may not be available in your distribution's repos.
91+
You may want to use a role for this.
7992

8093
=== Redis
8194

tasks/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
home: "{{ netbox_home }}"
4343

4444
- name: Ensure Postgres database exists (via socket)
45-
postgresql_db:
45+
community.postgresql.postgresql_db:
4646
name: "{{ netbox_database }}"
4747
login_user: "{{ netbox_database_user }}"
4848
login_unix_socket: "{{ netbox_database_socket }}"
@@ -54,7 +54,7 @@
5454
- netbox_database_host is not defined
5555

5656
- name: Ensure Postgres database exists (via TCP)
57-
postgresql_db:
57+
community.postgresql.postgresql_db:
5858
name: "{{ netbox_database }}"
5959
login_host: "{{ netbox_database_host }}"
6060
port: "{{ netbox_database_port }}"

0 commit comments

Comments
 (0)