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
edx
configuration
Commits
1389a660
Unverified
Commit
1389a660
authored
Jun 15, 2016
by
arbabnazar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
convert sudo_user to become user in roles for Ansible 2.x
parent
411f0092
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
18 deletions
+18
-18
playbooks/roles/aide/tasks/main.yml
+1
-1
playbooks/roles/alton/tasks/deploy.yml
+4
-4
playbooks/roles/analytics_api/tasks/main.yml
+7
-7
playbooks/roles/analytics_pipeline/tasks/main.yml
+4
-4
playbooks/roles/aws/tasks/main.yml
+2
-2
No files found.
playbooks/roles/aide/tasks/main.yml
View file @
1389a660
...
...
@@ -21,4 +21,4 @@
command
:
>
aideinit -y -f
creates=/var/lib/aide/aide.db
sudo
:
yes
become
:
yes
playbooks/roles/alton/tasks/deploy.yml
View file @
1389a660
...
...
@@ -18,7 +18,7 @@
git_2_0_1
:
>
dest="{{ alton_code_dir }}" repo="{{ alton_source_repo }}"
version="{{ alton_version }}" accept_hostkey=yes
sudo
_user
:
"
{{
alton_user
}}"
become
_user
:
"
{{
alton_user
}}"
register
:
alton_checkout
notify
:
restart alton
...
...
@@ -28,7 +28,7 @@
virtualenv="{{ alton_venv_dir }}"
state=present
extra_args="-i {{ COMMON_PYPI_MIRROR_URL }}"
sudo
_user
:
"
{{
alton_user
}}"
become
_user
:
"
{{
alton_user
}}"
notify
:
restart alton
-
name
:
create the supervisor wrapper
...
...
@@ -44,7 +44,7 @@
src=alton.conf.j2 dest="{{ supervisor_available_dir }}/alton.conf"
owner="{{ supervisor_user }}"
group="{{ supervisor_user }}"
sudo
_user
:
"
{{
supervisor_user
}}"
become
_user
:
"
{{
supervisor_user
}}"
notify
:
restart alton
-
name
:
enable the supervisor config
...
...
@@ -54,7 +54,7 @@
state=link
force=yes
mode=0644
sudo
_user
:
"
{{
supervisor_user
}}"
become
_user
:
"
{{
supervisor_user
}}"
when
:
not disable_edx_services
notify
:
restart alton
...
...
playbooks/roles/analytics_api/tasks/main.yml
View file @
1389a660
...
...
@@ -19,7 +19,7 @@
# Example play:
# - name: Deploy Analytics API
# hosts: all
#
sudo
: True
#
become
: True
# gather_facts: True
# vars:
# ENABLE_DATADOG: False
...
...
@@ -47,7 +47,7 @@
template
:
>
src=edx/app/analytics_api/analytics_api_gunicorn.py.j2
dest={{ analytics_api_home }}/analytics_api_gunicorn.py
sudo
_user
:
"
{{
analytics_api_user
}}"
become
_user
:
"
{{
analytics_api_user
}}"
tags
:
-
install
-
install:configuration
...
...
@@ -57,7 +57,7 @@
requirements="{{ analytics_api_requirements_base }}/{{ item }}"
virtualenv="{{ analytics_api_home }}/venvs/{{ analytics_api_service_name }}"
state=present
sudo
_user
:
"
{{
analytics_api_user
}}"
become
_user
:
"
{{
analytics_api_user
}}"
with_items
:
analytics_api_requirements
tags
:
-
install
...
...
@@ -69,7 +69,7 @@
DB_MIGRATION_USER='{{ COMMON_MYSQL_MIGRATE_USER }}'
DB_MIGRATION_PASS='{{ COMMON_MYSQL_MIGRATE_PASS }}'
{{ analytics_api_home }}/venvs/{{ analytics_api_service_name }}/bin/python ./manage.py migrate --noinput
sudo
_user
:
"
{{
analytics_api_user
}}"
become
_user
:
"
{{
analytics_api_user
}}"
environment
:
"
{{
analytics_api_environment
}}"
when
:
migrate_db is defined and migrate_db|lower == "yes"
tags
:
...
...
@@ -80,7 +80,7 @@
shell
:
>
chdir={{ analytics_api_code_dir }}
{{ analytics_api_home }}/venvs/{{ analytics_api_service_name }}/bin/python manage.py collectstatic --noinput
sudo
_user
:
"
{{
analytics_api_user
}}"
become
_user
:
"
{{
analytics_api_user
}}"
environment
:
"
{{
analytics_api_environment
}}"
tags
:
-
assets
...
...
@@ -90,7 +90,7 @@
shell
:
>
chdir={{ analytics_api_code_dir }}
{{ analytics_api_home }}/venvs/{{ analytics_api_service_name }}/bin/python manage.py set_api_key {{ item.key }} {{ item.value }}
sudo
_user
:
"
{{
analytics_api_user
}}"
become
_user
:
"
{{
analytics_api_user
}}"
environment
:
"
{{
analytics_api_environment
}}"
with_dict
:
ANALYTICS_API_USERS
tags
:
...
...
@@ -164,6 +164,6 @@
config={{ supervisor_cfg }}
name={{ analytics_api_service_name }}
when
:
not disable_edx_services
sudo
_user
:
"
{{
supervisor_service_user
}}"
become
_user
:
"
{{
supervisor_service_user
}}"
tags
:
-
manage:start
playbooks/roles/analytics_pipeline/tasks/main.yml
View file @
1389a660
...
...
@@ -29,7 +29,7 @@
#
# - name: Deploy all dependencies of edx-analytics-pipeline to the node
# hosts: all
#
sudo
: True
#
become
: True
# gather_facts: True
# roles:
# - analytics_pipeline
...
...
@@ -136,7 +136,7 @@
-
name
:
ensure package dir exists in HDFS
shell
:
>
. {{ HADOOP_COMMON_CONF_DIR }}/hadoop-env.sh && hdfs dfs -mkdir -p /edx-analytics-pipeline/packages/
sudo
_user
:
"
{{
hadoop_common_user
}}"
become
_user
:
"
{{
hadoop_common_user
}}"
tags
:
-
install
-
install:app-requirements
...
...
@@ -144,7 +144,7 @@
-
name
:
ensure util library is in HDFS
shell
:
>
. {{ HADOOP_COMMON_CONF_DIR }}/hadoop-env.sh && hdfs dfs -put -f {{ HADOOP_COMMON_USER_HOME }}/lib/edx-analytics-hadoop-util.jar /edx-analytics-pipeline/packages/
sudo
_user
:
"
{{
hadoop_common_user
}}"
become
_user
:
"
{{
hadoop_common_user
}}"
tags
:
-
install
-
install:app-requirements
...
...
@@ -152,7 +152,7 @@
-
name
:
ensure the data directory exists
shell
:
>
. {{ HADOOP_COMMON_CONF_DIR }}/hadoop-env.sh && hdfs dfs -mkdir -p {{ ANALYTICS_PIPELINE_HDFS_DATA_DIR }}
sudo
_user
:
"
{{
hadoop_common_user
}}"
become
_user
:
"
{{
hadoop_common_user
}}"
tags
:
-
install
-
install:base
...
...
playbooks/roles/aws/tasks/main.yml
View file @
1389a660
...
...
@@ -142,12 +142,12 @@
-
name
:
restart ssh
service
:
name=ssh state=restarted
sudo
:
True
become
:
True
when
:
sshd_config.changed
when
:
ansible_distribution in common_debian_variants
-
name
:
restart ssh
service
:
name=sshd state=restarted
sudo
:
True
become
:
True
when
:
sshd_config.changed
when
:
ansible_distribution in common_redhat_variants
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