Comments (5)
Hmm, I cannot reproduce this problem. Could you send the whole passwd file as a private message to see if I have the same problem? Thanks!
from cuisine.
It's some weird message you get when /etc/hosts doesn't have the alias that is hostname. In other words you're fine if
hostname
gives youfoo
and your/etc/hosts
contains127.0.0.1 localhost foo
- if you only have
127.0.0.1 localhost
then fabric moans about sudo which in turn triggers thischeck_user()
bug
Here's what I quickly hacked together today:
def add_system_uuid_alias():
"""Adds system UUID alias to /etc/hosts.
Some tools/processes rely/want the hostname as an alias in
/etc/hosts e.g. 127.0.0.1 localhost <hostname>.
"""
with mode_sudo(), cd('/etc'):
old = "127.0.0.1 localhost"
new = old + " " + get_system_uuid()
file_update('hosts', lambda x: text_replace_line(x, old, new)[0])
def get_system_uuid():
"""Gets a machines UUID (Universally Unique Identifier)."""
return sudo('dmidecode -s system-uuid | tr "[A-Z]" "[a-z]"')
It makes sense to have 127.0.0.1 localhost foo
but then cuisine/fabric should guard against this bug anyway.
from cuisine.
Thanks, I'll integrate this!
from cuisine.
Integrated in f4dc4ba
from cuisine.
cool, thanks... I am not sure though about the actual cause for the bug. Either way, check_user should guard against this anyhow.
from cuisine.
Related Issues (20)
- group_user_ensure fails in suse 11 sp3 HOT 5
- `user_create` function appears in duplicate HOT 1
- cuisine.file_write fails with 7.6 and 7.7 HOT 2
- Why `apt_get` function executes a command twice?
- What is changed between version 0.7.6 and 0.7.7? HOT 6
- SyntaxError: 'invalid syntax' cuisine.py at 342 HOT 1
- how to set up attributes (chef like ) in cuisine HOT 1
- `dir_ensure` tries to create the directory even if it exists HOT 3
- Please rename "bsd" features "freebsd" HOT 2
- file_upload() behavior for lcd context incompatible with fabric put() HOT 4
- Using hashlib breaks compatibility with CentoOS 5 HOT 2
- package_ensure_apt(package_name, update=True) upgrade all package not only selected HOT 2
- Newline at end of updated text
- process_find can't find processes due to leading spaces. HOT 3
- trapping fabric.exceptions.NetworkError HOT 3
- NameError: name 'env' is not defined HOT 2
- README links
- Support for Fabric 2.x? HOT 1
- Fix simple typo: referes -> refers
- Python 3 support
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 cuisine.