Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SRCT
go
Commits
bfcc1fe0
Commit
bfcc1fe0
authored
Jul 30, 2016
by
David Haynes
Browse files
Slightly cleaner syntax
- upping our style game
parent
96b887d7
Pipeline
#309
failed with stages
in 5 minutes and 58 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
provisioning/playbook.yml
View file @
bfcc1fe0
...
...
@@ -10,7 +10,9 @@
-
hosts
:
all
tasks
:
-
name
:
install go packages
apt
:
name={{ item }} state=latest
apt
:
name
:
"
{{
item
}}"
state
:
latest
with_items
:
-
python
-
python-dev
...
...
@@ -26,54 +28,54 @@
-
libjpeg-dev
-
name
:
create mysql user
mysql_user
:
>
name
=
{{ mysql['user'] }}
password
=
{{ mysql['pass'] }}
login_password
=
{{ mysql['root_pass'] }}
login_user
=
{{ mysql['root_user'] }}
state
=
present
host
=
localhost
priv
=
{{ mysql['db'] }}.*:ALL
mysql_user
:
name
:
"
{{
mysql['user']
}}
"
password
:
"
{{
mysql['pass']
}}
"
login_password
:
"
{{
mysql['root_pass']
}}
"
login_user
:
"
{{
mysql['root_user']
}}
"
state
:
present
host
:
localhost
priv
:
{{
mysql
[
'
db'
]
}}
.*:ALL
-
name
:
create mysql database
mysql_db
:
>
name
=
{{ mysql['db'] }}
state
=
present
login_user
=
{{ mysql['root_user'] }}
login_password
=
{{ mysql['root_pass'] }}
mysql_db
:
name
:
"
{{
mysql['db']
}}
"
state
:
present
login_user
:
"
{{
mysql['root_user']
}}
"
login_password
:
"
{{
mysql['root_pass']
}}
"
-
name
:
give mysql user access to test db
mysql_user
:
>
name
=
{{ mysql['user'] }}
login_password
=
{{ mysql['root_pass'] }}
login_user
=
{{ mysql['root_user'] }}
state
=
present
host
=
localhost
priv
=
test_{{ mysql['db'] }}.*:ALL
append_privs
=
yes
mysql_user
:
name
:
"
{{
mysql['user']
}}
"
login_password
:
"
{{
mysql['root_pass']
}}
"
login_user
:
"
{{
mysql['root_user']
}}
"
state
:
present
host
:
localhost
priv
:
test_{{ mysql['db'] }}.*:ALL
append_privs
:
yes
-
name
:
install site packages to virtual env
pip
:
>
requirements
=
{{ django['requirements_path'] }}
virtualenv
=
{{ django['venv_path'] }}
virtualenv_python
=
python2.7
pip
:
requirements
:
"
{{
django['requirements_path']
}}
"
virtualenv
:
"
{{
django['venv_path']
}}
"
virtualenv_python
:
python2.7
-
name
:
install django settings.py
template
:
>
src
=
templates/settings.py.j2
dest
=
{{ django['settings_path'] }}/settings.py
backup
=
yes
template
:
src
:
templates/settings.py.j2
dest
:
"
{{
django['settings_path']
}}/settings.py
"
backup
:
yes
-
name
:
install django secret.py
template
:
>
src
=
templates/secret.py.j2
dest
=
{{ django['settings_path'] }}/secret.py
template
:
src
:
templates/secret.py.j2
dest
:
"
{{
django['settings_path']
}}/secret.py
"
-
name
:
setup django database
django_manage
:
>
command
=
{{ item }}
app_path
=
{{ django['app_path'] }}
virtualenv
=
{{ django['venv_path'] }}
django_manage
:
command
:
"
{{
item
}}
"
app_path
:
"
{{
django['app_path']
}}
"
virtualenv
:
"
{{
django['venv_path']
}}
"
with_items
:
-
flush
-
makemigrations
...
...
@@ -81,10 +83,10 @@
-
migrate
-
name
:
create python superuser (defaults to dhaynes3)
django_manage
:
>
command
=
"createsuperuser --noinput --username={{ django['superuser'] }} --email={{ django['superuser'] }}@masonlive.gmu.edu"
app_path
=
{{ django['app_path'] }}
virtualenv
=
{{ django['venv_path'] }}
django_manage
:
command
:
"
createsuperuser
--noinput
--username={{
django['superuser']
}}
--email={{
django['superuser']
}}@masonlive.gmu.edu"
app_path
:
"
{{
django['app_path']
}}
"
virtualenv
:
"
{{
django['venv_path']
}}
"
-
name
:
killing old screen sessions
shell
:
screen -ls | grep -q django && screen -X -S django quit
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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