Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
configuration
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
configuration
Commits
d8d906eb
Commit
d8d906eb
authored
Mar 14, 2014
by
John Jarvis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
moving the dump vars back to the edx_ansible role
parent
87823aab
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
22 additions
and
70 deletions
+22
-70
playbooks/roles/aws/defaults/main.yml
+0
-7
playbooks/roles/aws/tasks/main.yml
+0
-56
playbooks/roles/edx_ansible/defaults/main.yml
+7
-1
playbooks/roles/edx_ansible/tasks/deploy.yml
+15
-6
playbooks/roles/edx_ansible/templates/dumpall.yml.j2
+0
-0
No files found.
playbooks/roles/aws/defaults/main.yml
View file @
d8d906eb
...
...
@@ -34,19 +34,12 @@ AWS_S3_LOG_PATHS:
-
bucket
:
"
{{
COMMON_ENVIRONMENT
}}-{{
COMMON_DEPLOYMENT
}}-tracking-logs"
path
:
"
{{
COMMON_LOG_DIR
}}/*tracking*"
# set this to true dump all extra vars
# this is currently broken when extra vars
# contains references to vars that are not
# included in the play.
AWS_DUMP_VARS
:
false
#
# vars are namespace with the module name.
#
aws_role_name
:
aws
aws_data_dir
:
"
{{
COMMON_DATA_DIR
}}/aws"
aws_app_dir
:
"
{{
COMMON_APP_DIR
}}/aws"
aws_var_file
:
"
{{
aws_app_dir
}}/server-vars.yml"
aws_s3_sync_script
:
"
{{
aws_app_dir
}}/send-logs-to-s3"
aws_s3_logfile
:
"
{{
aws_log_dir
}}/s3-log-sync.log"
aws_log_dir
:
"
{{
COMMON_LOG_DIR
}}/aws"
...
...
playbooks/roles/aws/tasks/main.yml
View file @
d8d906eb
...
...
@@ -62,62 +62,6 @@
dest={{ COMMON_BIN_DIR }}/s3cmd
state=link
# The sync script and config file are now symlinks
# Remove them if they are regular files
# This can be removed once we don't need to worry
# about backwards compatibility.
-
stat
:
path={{ COMMON_BIN_DIR }}/{{ aws_s3_sync_script|basename }}
register
:
sync_script
-
stat
:
path={{ COMMON_CFG_DIR}}/{{ aws_var_file|basename }}
register
:
var_file
-
file
:
path={{ COMMON_BIN_DIR }}/{{ aws_s3_sync_script|basename }} state=absent
when
:
sync_script.stat.exists and sync_script.stat.isreg
-
file
:
path={{ COMMON_CFG_DIR}}/{{ aws_var_file|basename }} state=absent
when
:
var_file.stat.exists and var_file.stat.isreg
-
name
:
dump all vars to yaml
template
:
src=dumpall.yml.j2 dest={{ aws_var_file }} mode=0600
when
:
AWS_DUMP_VARS
-
name
:
create symlink for config file
file
:
>
src={{ aws_var_file }}
dest={{ COMMON_CFG_DIR }}/{{ aws_var_file|basename }}
state=link
when
:
AWS_DUMP_VARS
-
name
:
clean up var file, removing all version vars and internal ansible vars
shell
:
sed -i -e "/{{item}}/d" {{ aws_var_file }}
with_items
:
# deploy versions
-
"
^edx_platform_version:"
-
"
^edx_platform_commit:"
-
"
^xqueue_version:"
-
"
^forum_version:"
-
"
^xserver_version:"
-
"
^discern_ease_version:"
-
"
^ora_ease_version:"
-
"
^discern_version:"
-
"
^ora_version:"
-
"
^configuration_version:"
-
"
^ease_version:"
-
"
^certs_version:"
# other misc vars
-
"
^tags:"
-
"
^_original_file:"
-
"
^register:"
-
"
^item:"
-
"
^failed_when:"
-
"
^changed_when:"
-
"
^delegate_to:"
-
"
^ansible_ssh_private_key_file:"
-
"
^always_run:"
when
:
AWS_DUMP_VARS
-
name
:
create s3 log sync script
template
:
>
dest={{ aws_s3_sync_script }}
...
...
playbooks/roles/edx_ansible/defaults/main.yml
View file @
d8d906eb
...
...
@@ -13,6 +13,12 @@
#
# OS packages
#
# set this to true dump all extra vars
# this is currently broken when extra vars
# contains references to vars that are not
# included in the play.
EDX_ANSIBLE_DUMP_VARS
:
false
edx_ansible_debian_pkgs
:
-
python-pip
...
...
@@ -32,6 +38,6 @@ edx_ansible_venv_bin: "{{ edx_ansible_venv_dir }}/bin"
edx_ansible_user
:
"
edx-ansible"
edx_ansible_source_repo
:
https://github.com/edx/configuration.git
edx_ansible_requirements_file
:
"
{{
edx_ansible_code_dir
}}/requirements.txt"
edx_ansible_var_file
:
"
{{
edx_ansible_data_dir
}}/server-vars.yml"
# edX configuration repo
configuration_version
:
master
edx_ansible_var_file
:
"
{{
edx_ansible_app_dir
}}/server-vars.yml"
playbooks/roles/edx_ansible/tasks/deploy.yml
View file @
d8d906eb
...
...
@@ -18,12 +18,6 @@
dest={{ COMMON_BIN_DIR }}/update
state=link
-
name
:
create a symlink for var file
file
:
>
src={{ edx_ansible_var_file }}
dest={{ COMMON_CFG_DIR }}/{{ edx_ansible_var_file|basename }}
state=link
-
name
:
create a symlink for ansible-playbook
file
:
>
src={{ edx_ansible_venv_bin }}/ansible-playbook
...
...
@@ -35,3 +29,18 @@
src={{ edx_ansible_code_dir }}/playbooks
dest={{ COMMON_CFG_DIR }}/playbooks
state=link
-
name
:
dump all vars to yaml
template
:
src=dumpall.yml.j2 dest={{ edx_ansible_var_file }} mode=0600
when
:
EDX_ANSIBLE_DUMP_VARS
-
name
:
create symlink for config file
file
:
>
src={{ edx_ansible_var_file }}
dest={{ COMMON_CFG_DIR }}/{{ edx_ansible_var_file|basename }}
state=link
when
:
EDX_ANSIBLE_DUMP_VARS
-
name
:
clean up var file, removing all version vars and internal ansible vars (anything not caps)
shell
:
python -c "import yaml; y=yaml.load(open('{{ edx_ansible_var_file }}')); f=open('{{ edx_ansible_var_file }}', 'wb'); f.write(yaml.safe_dump({key:value for key,value in y.iteritems() if key.isupper()}, default_flow_style=False)); f.close();"
when
:
EDX_ANSIBLE_DUMP_VARS
playbooks/roles/
aws
/templates/dumpall.yml.j2
→
playbooks/roles/
edx_ansible
/templates/dumpall.yml.j2
View file @
d8d906eb
File moved
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