Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
ansible
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Daniel Stevenson
ansible
Commits
3b4126df
Unverified
Commit
3b4126df
authored
5 years ago
by
Agate
Browse files
Options
Downloads
Patches
Plain Diff
Fixed some db issues due to delegation
parent
0234dbef
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
defaults/main.yml
+2
-2
2 additions, 2 deletions
defaults/main.yml
tasks/db.yml
+7
-8
7 additions, 8 deletions
tasks/db.yml
with
9 additions
and
10 deletions
defaults/main.yml
+
2
−
2
View file @
3b4126df
...
@@ -14,8 +14,8 @@ funkwhale_database_managed: true
...
@@ -14,8 +14,8 @@ funkwhale_database_managed: true
funkwhale_database_local
:
true
funkwhale_database_local
:
true
funkwhale_database_name
:
funkwhale
funkwhale_database_name
:
funkwhale
funkwhale_database_user
:
funkwhale
funkwhale_database_user
:
funkwhale
# the DB host as per your ansible inventory
# the DB host as per your ansible inventory
. No delegation is used if left empty
funkwhale_database_host_ansible
:
localhost
funkwhale_database_host_ansible
:
# the DB FQDN or IP for funkwhale connector configuration (ex: pg01.local)
# the DB FQDN or IP for funkwhale connector configuration (ex: pg01.local)
funkwhale_database_host_app
:
localhost
funkwhale_database_host_app
:
localhost
funkwhale_database_port
:
5432
funkwhale_database_port
:
5432
...
...
This diff is collapsed.
Click to expand it.
tasks/db.yml
+
7
−
8
View file @
3b4126df
...
@@ -13,26 +13,25 @@
...
@@ -13,26 +13,25 @@
name
:
postgresql
name
:
postgresql
state
:
started
state
:
started
-
name
:
"
Create
{{
funkwhale_database_user
}}
database
user
on
{{
funkwhale_database_host_ansible
}}
(local
/
passwordless)"
-
name
:
"
Create
{{
funkwhale_database_user
}}
database
user
on
{{
funkwhale_database_host_ansible
or
inventory_hostname
}}
(local
/
passwordless)"
become
:
true
become
:
true
become_user
:
postgres
become_user
:
postgres
when
:
funkwhale_database_managed and funkwhale_database_host_ansible ==
'localhost'
when
:
funkwhale_database_managed and funkwhale_database_host_ansible ==
none
postgresql_user
:
postgresql_user
:
name
:
"
{{
funkwhale_database_user
}}"
name
:
"
{{
funkwhale_database_user
}}"
login_user
:
postgres
login_user
:
postgres
delegate_to
:
"
{{
funkwhale_database_host_ansible
}}"
-
name
:
"
Create
{{
funkwhale_database_user
}}
database
user
on
{{
funkwhale_database_host_ansible
}}
(remote
/
with
password)"
-
name
:
"
Create
{{
funkwhale_database_user
}}
database
user
on
{{
funkwhale_database_host_ansible
}}
(remote
/
with
password)"
become
:
true
become
:
true
become_user
:
postgres
become_user
:
postgres
when
:
funkwhale_database_managed and funkwhale_database_host_ansible !=
'localhost'
when
:
funkwhale_database_managed and funkwhale_database_host_ansible !=
none
postgresql_user
:
postgresql_user
:
name
:
"
{{
funkwhale_database_user
}}"
name
:
"
{{
funkwhale_database_user
}}"
password
:
"
{{
funkwhale_database_password
}}"
password
:
"
{{
funkwhale_database_password
}}"
login_user
:
postgres
login_user
:
postgres
delegate_to
:
"
{{
funkwhale_database_host_ansible
}}"
delegate_to
:
"
{{
funkwhale_database_host_ansible
or
inventory_hostname
}}"
-
name
:
"
Create
{{
funkwhale_database_name
}}
database
on
{{
funkwhale_database_host_ansible
}}"
-
name
:
"
Create
{{
funkwhale_database_name
}}
database
on
{{
funkwhale_database_host_ansible
or
inventory_hostname
}}"
become
:
true
become
:
true
become_user
:
postgres
become_user
:
postgres
when
:
funkwhale_database_managed
when
:
funkwhale_database_managed
...
@@ -42,7 +41,7 @@
...
@@ -42,7 +41,7 @@
owner
:
"
{{
funkwhale_database_user
}}"
owner
:
"
{{
funkwhale_database_user
}}"
encoding
:
UTF-8
encoding
:
UTF-8
template
:
template0
template
:
template0
delegate_to
:
"
{{
funkwhale_database_host_ansible
}}"
delegate_to
:
"
{{
funkwhale_database_host_ansible
or
inventory_hostname
}}"
-
name
:
set up pgsql extensions
-
name
:
set up pgsql extensions
become
:
yes
become
:
yes
...
@@ -55,6 +54,6 @@
...
@@ -55,6 +54,6 @@
loop
:
[
'
unaccent'
,
'
citext'
]
loop
:
[
'
unaccent'
,
'
citext'
]
loop_control
:
loop_control
:
loop_var
:
myext
loop_var
:
myext
delegate_to
:
"
{{
funkwhale_database_host_ansible
}}"
delegate_to
:
"
{{
funkwhale_database_host_ansible
or
inventory_hostname
}}"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment