Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
noc
tower
Commits
745821a3
Commit
745821a3
authored
Nov 10, 2020
by
EKbfh
🐼
Browse files
Merge branch 'change-playbook-repo' into 'master'
Add migration for playbook url See merge request
!68
parents
a9d751e1
1aba44fa
Pipeline
#28409
passed with stages
in 7 minutes and 2 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
tower/migrations/038_change_playbook_repo_to_noc.py
0 → 100644
View file @
745821a3
# Third-party modules
from
peewee
import
CharField
,
Model
def
migrate
(
migrator
):
class
Environment
(
Model
):
class
Meta
(
object
):
database
=
migrator
.
db
db_table
=
"environment"
name
=
CharField
(
unique
=
True
)
playbook_link
=
CharField
()
if
len
(
Environment
.
select
())
!=
0
:
for
env
in
Environment
.
select
():
if
env
.
playbook_link
==
'git+https://github.com/nocproject/ansible_deploy@microservices'
:
env
.
playbook_link
=
"git+https://github.com/nocproject/noc@stable"
env
.
save
()
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment