Comments (3)
by default all commands will be run as --user and it won't use sudo by
default, in your example the command needs to be run as root.
In your top level playbook you can tell ansible to always use sudo which
might be simpler than setting sudo for every task.
http://ansible.cc/docs/playbooks.html#playbook-language-example
On Mon, May 13, 2013 at 5:52 PM, VikParuchuri [email protected]:
I am periodically merging master into my branch that configures the ml
api, and the biggest issue is the removal of sudo in the common playbook.
How is the lack of sudo working?For example, this will fail:
- name: Create data dir
file: path={{ app_base_dir }}/data state=directory owner=root group=root
tags:
- pre_install
This will succeed:
- name: Create data dir
file: path={{ app_base_dir }}/data state=directory owner=root group=root
sudo: True
tags:
- pre_install
Am I doing something wrong with users or the ansible command?
I am running:
ansible-playbook mlapi_sandbox.yml -i ./ec2.py -c ssh --user=ubuntu -v
This is happening in the aws-sandbox account.
—
Reply to this email directly or view it on GitHubhttps://github.com/edx/configuration/issues/60
.
from configuration.
So, sudo isn't an activity variable, it's a playbook variable. So once it's
set by any activity, it's set for all activities.
It was dropped out of common because I felt it should be defined as close
as possible to the scope in which it applied, e.g., edx_prod.yml,
edx_stage.yml, oc edx_custom.yml. So in your case, Vik, I'd define it
after the - host line in mlapi_sandbox.yml, like so:
- host tag_my_boxes
- sudo: True
- vars yadda yadda yadda
HTH,
Joe
On Mon, May 13, 2013 at 2:52 PM, VikParuchuri [email protected]:
I am periodically merging master into my branch that configures the ml
api, and the biggest issue is the removal of sudo in the common playbook.
How is the lack of sudo working?For example, this will fail:
- name: Create data dir
file: path={{ app_base_dir }}/data state=directory owner=root group=root
tags:
- pre_install
This will succeed:
- name: Create data dir
file: path={{ app_base_dir }}/data state=directory owner=root group=root
sudo: True
tags:
- pre_install
Am I doing something wrong with users or the ansible command?
I am running:
ansible-playbook mlapi_sandbox.yml -i ./ec2.py -c ssh --user=ubuntu -v
This is happening in the aws-sandbox account.
—
Reply to this email directly or view it on GitHubhttps://github.com/edx/configuration/issues/60
.
from configuration.
Thanks a lot, John and Joe!
from configuration.
Related Issues (20)
- Broken link to sqoop
- Native Open edX Ubuntu 16.04 64 bit Installation---behind a proxy:-----TASK [forum : initialize elasticsearch] fatal: HOT 2
- An error occurred while I was executing the sandbox.sh file.
- An error occurred while I was executing the TASK [edxapp : code sandbox | Install base sandbox requirements and create sandbox virtualenv]
- Fixes a bug that occurs in the installation of Analytics Single
- Fail on Insights when install Analytics_Single
- Error install bower dependencies Task insights - Native Open edX Ubuntu 16.04 64 bit Installation HOT 3
- Missing Variables for Journals causing errors during installation HOT 5
- Ansible task that install bower dependencies failing due to bower repository at . http://bower.herokuapp.com/ HOT 5
- conflicting requirements in requirements.txt
- TASK [edxapp : install node dependencies] fails when launched from native.sh
- ImportError: No module named settings.local HOT 1
- Install failing on GCP HOT 4
- nginx config prevents loading of xml files in xblock
- Installation failed due to LibSass warning HOT 9
- stuck on TASK [edxapp : checkout edx-platform repo into /edx/app/edxapp/edx-platform] HOT 3
- Unavailable (access denied) all vagrant boxes from http://files.edx.org/
- 'dict object' has no attribute 'iteritems' and rbenv error on fresh install attempt HOT 2
- TASK [oraclejdk : Download Oracle Java] FAILED! HOT 1
- apt packages installation might need to be reviewed
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from configuration.