This repository has been archived by the owner on Jan 30, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Does not install maria or mysql, but will work if it is already installed. re #4517
- Loading branch information
Showing
16 changed files
with
93 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
pulp3-database | ||
================ | ||
|
||
Optionally install a database, then configure for Pulp. | ||
|
||
More specifically, this role does the following: | ||
|
||
1. Call the external role to install a database if `pulp_install_db` is true. | ||
2. Install the Python bindings to interact with the specified database. | ||
3. Create and run migrations. | ||
|
||
Role Variables: | ||
--------------- | ||
|
||
* `pulp_database_config`: Defines how Pulp will talk to PostgreSQL. Default values are constructed | ||
* from the other variables defined here. See `defaults/main.yml`. | ||
* `pulp_db_host`: Host of the database instance. Defaults to localhost. | ||
* `pulp_db_name`: Name of the database, defaults to pulp. | ||
* `pulp_db_user`: Database user, should match linux user. Defaults to pulp | ||
* `pulp_db_password`: Password for Postgresql user. Defaults to pulp | ||
* `pulp_db_backend`: Django setting for db backend. for databasePassword for Postgresql user. | ||
Defaults to "django.db.backends.postgresql_psycopg2" | ||
* `pulp_install_db`: Defaults to true. Whether to install a database. | ||
|
||
Shared Variables: | ||
----------------- | ||
|
||
* `ansible_python_interpreter`: **Required**. Path to the Python interpreter. | ||
|
||
This role **is tightly coupled** with the required the `pulp3` role and uses some of | ||
variables which are documented in that role: | ||
|
||
* `pulp_user` | ||
* `pulp_install_dir` | ||
* `pulp_install_plugins` | ||
* `pulp_default_admin_password` | ||
|
||
|
||
This role optionally depends on other roles to install a database. | ||
|
||
Operating Systems Variables: | ||
---------------------------- | ||
|
||
Each currently supported operating system has a matching file in the "vars" | ||
directory. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
pulp_install_db: true | ||
pulp_db_host: localhost | ||
pulp_db_name: pulp | ||
pulp_db_user: pulp | ||
pulp_db_password: pulp | ||
pulp_db_backend: django.db.backends.postgresql_psycopg2 | ||
pulp_database_config: | ||
default: | ||
HOST: "{{ pulp_db_host }}" | ||
ENGINE: "{{ pulp_db_backend }}" | ||
NAME: "{{ pulp_db_name}}" | ||
USER: "{{ pulp_db_user }}" | ||
PASSWORD: "{{ pulp_db_password }}" |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
- fail: | ||
msg: "MySQL/Maria installation is not implented. Please install manually and set pulp_install_database to false." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
- block: | ||
- name: Install SCL package | ||
package: | ||
name: 'centos-release-scl' | ||
state: present | ||
when: ansible_distribution == 'CentOS' | ||
|
||
- name: Set listen addresses | ||
set_fact: | ||
postgresql_global_config_options: | ||
- option: listen_addresses | ||
value: "*" | ||
when: pulp_db_host != 'localhost' | ||
|
||
- name: Install and configure PostgreSQL | ||
import_role: | ||
name: geerlingguy.postgresql | ||
become: yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters