osxc / legacy-common Goto Github PK
View Code? Open in Web Editor NEWDEPRECATED: Common tools for hackers
Home Page: http://osxc.github.io
License: MIT License
DEPRECATED: Common tools for hackers
Home Page: http://osxc.github.io
License: MIT License
Something's weird.
Whatever I do, my git name is configured to Bob example, although my xc-custom contains the correct value (the email parameter is not ignored and the name is):
TASK: [git | configure name] **************************************************
changed: [localhost] => {"changed": true, "cmd": ["git", "config", "--global", "user.name", "Bob Example"], "delta": "0:00:00.008788", "end": "2014-05-05 14:47:38.739198", "item": "", "rc": 0, "start": "2014-05-05 14:47:38.730410", "stderr": "", "stdout": ""}
I have the same issue with rbenv rubies), it always install 2.1.1 regardless of my all.yml configuration:
TASK: [rbenv | install and build rubies] **************************************
skipping: [localhost] => (item=2.1.1)
TASK: [rbenv | set 2.0.0-p195 as global ruby] *********************************
changed: [localhost] => {"changed": true, "cmd": ["rbenv", "global", "2.1.1"], "delta": "0:00:00.043683", "end": "2014-05-05 14:57:55.417448", "item": "", "rc": 0, "start": "2014-05-05 14:57:55.373765", "stderr": "", "stdout": ""}
Note the curious discrepancy between the item=2.1.1 and the set 2.0.0-p195 as global ruby (here the rubies parameter is ignored and the global is not).
cf https://github.com/octplane/xc-custom/blob/master/all.yml#L31 (I'm using another ansible syntax, but the one in the default all.yml has the same effects).
This makes me sad, as I can only commit as Bob Example and my coworker make fun of me 😸
homebrew
takes ages (git ?)
brew_package
reupdates brew cache every time
Maybe I'm missing something in my ansible playbook setup, but what I'm seeing is the following behavior:
Playbook as follows:
---
- hosts: all
- role: rbenv
- role: gem_package
package_name: bundler
Hi.
How should one start learning to write new roles (I have golang in my mind)? Ansible documentation and tutorials are geared towards managing servers. What do you need to think differently in osxc-style?
What would the code to check if a file exists and load it from GitHub if it is missing look like?
Causing ansible to fail in pain:
failed: [localhost] => (item=2.1.1) => {"changed": true, "cmd": ["rbenv", "install", "2.1.1"], "delta": "0:00:00.046203", "end": "2014-05-05 13:55:38.173794", "item": "2.1.1", "rc": 1, "start": "2014-05-05 13:55:38.127591"}
stderr: rbenv: /usr/local/opt/rbenv/versions/2.1.1 already exists
If I understand the homebrew/tasks/main.yml file correctly, it clones the homebrew repo into {{brew_repo_path}}
and then very carefully does nothing with it if homebrew is already installed (in particular, if /usr/local/bin/brew exists).
Why even clone it at all in that case?
In other words, should 'clone homebrew' come after 'assert new homebrew installation'?
Hi guys,
Any ideas, to solve that issue ?
TASK: [dock | add apps] *******************************************************
<localhost> REMOTE_MODULE command ~/src/github.com/kcrawford/dockutil/scripts/dockutil --add /Applications/Finder.app
<localhost> EXEC ['/bin/sh', '-c', 'mkdir -p $HOME/.ansible/tmp/ansible-tmp-1399881877.09-60038311989509 && chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1399881877.09-60038311989509 && echo $HOME/.ansible/tmp/ansible-tmp-1399881877.09-60038311989509']
<localhost> PUT /var/folders/3x/ldtzdqpx2sz9bz64lsq1x8w40000gn/T/tmpkjR7xv TO /Users/florian/.ansible/tmp/ansible-tmp-1399881877.09-60038311989509/command
<localhost> EXEC ['/bin/sh', '-c', u'LC_CTYPE=en_US.UTF-8 LANG=en_US.UTF-8 /usr/bin/python /Users/florian/.ansible/tmp/ansible-tmp-1399881877.09-60038311989509/command; rm -rf /Users/florian/.ansible/tmp/ansible-tmp-1399881877.09-60038311989509/ >/dev/null 2>&1']
failed: [localhost] => (item=/Applications/Finder.app) => {"changed": true, "cmd": ["~/src/github.com/kcrawford/dockutil/scripts/dockutil", "--add", "/Applications/Finder.app"], "delta": "0:00:00.119017", "end": "2014-05-12 10:04:37.266834", "item": "/Applications/Finder.app", "rc": 1, "start": "2014-05-12 10:04:37.147817"}
stderr: Traceback (most recent call last):
File "/Users/florian/src/github.com/kcrawford/dockutil/scripts/dockutil", line 627, in <module>
main()
File "/Users/florian/src/github.com/kcrawford/dockutil/scripts/dockutil", line 340, in main
if addItem(pl, real_add_path, replace_label, position, before_item, after_item, section, displayas, showas, arrangement, tile_type, label_name):
File "/Users/florian/src/github.com/kcrawford/dockutil/scripts/dockutil", line 485, in addItem
add_path = unicode(add_path, sys.stdin.encoding)
TypeError: unicode() argument 2 must be string, not None
❯❯❯ python
Python 2.7.5 (default, Aug 25 2013, 00:04:04)
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
❯❯❯ locale
LANG="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_CTYPE="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
Tests
❯❯❯ cat ./test
#!/usr/bin/python
import sys
print sys.stdin.encoding
print unicode("test", sys.stdin.encoding)
❯❯❯ ./test
UTF-8
test
The script itself work as expected
❯❯❯ ~/src/github.com/kcrawford/dockutil/scripts/dockutil --add /Applications/Finder.app ⏎
Thank you !
Every time I run ansible the clone homebrew
step takes several seconds even though it is already cloned/installed.
On: OS X 10.9
I'm new to ansible I try to find a way to set global env variables for the entire playbook but couldn't find a way to do so.
Right now I i just set the var before running ansible and it works fine as a workaround
The clean
task only runs if ~/.managed_dock
doesn't exist. However this usually results in the Dock not reflecting the state written in the role.
Brand new mavericks install, ran xc-boot, then:
TASK: [homebrew | clean up /usr/local] ****************************************
failed: [localhost] => {"failed": true, "item": "", "parsed": false}
invalid output was: [sudo via ansible, key=xxxx] password:
FATAL: all hosts have already failed -- aborting
The way dotfile resolution takes place on OSX, if you create a .bash_profile it is positioned in front of - and instead of - .profile. That means creating .bash_profile effectively disables .profile, which in my case is massively breaky.
More generally, it would be great if there was some more structured way to manipulate environment variables than appending strings to one possible dotfile. A project such as this might be an unusually good opportunity to bring about such a thing.
i'm still on the edge with osxc. seems very useful for setting up a new mac. but i need explanations of the available roles, what they do, and how to use it in my all.yml
file.
most of it are quite obvious. but roles like dock
, maximum_awesome
or oh_my_zsh
is mysterious to me. could you possibly put this in a wiki or something?
btw, will there be roles to change OS settings?
thx!
The example config has maybe 30 lines of information in 160 lines of yaml. I find this fairly obscene. Is there any hope for a more concise syntax?
As a strawman for illustrative purposes only, something like
- role: brew_package
package_names: node, maven, leiningen, sbt, go, rust, android-sdk, android-ndk, postgres, ...
- role: npm_package
package_names: aglio, bower, grunt, ...
- role: cask_package
package_names: firefox, dropbox, chromium, ....
would be a huge improvement.
Hello
How can I do a brew install libav --with-theora --with-libvorbis --with-libvo-aacenc --with-libvpx
in all.yml?
I have tried many things among them:
- role: brew_package
package_name: libav
brew_opts:
- with-theora
- with-libvorbis
- with-libvo-aacenc
- with-libvpx
It looks like the homebrew stuff now lives under an org account named Homebrew, rather than under mxcl's account.
In the spirit of consistently cloning into dirs in ~/src/github.com named after the account, in xc-common/roles/homebrew/defaults/main.yml, should
brew_repo_path: "{{ ansible_env.HOME }}/src/github.com/mxcl/homebrew"
instead be
brew_repo_path: "{{ ansible_env.HOME }}/src/github.com/Homebrew/homebrew"
Finally got around to installing Yosemite in my test VM to check out osxc and... not working.
Ansible's facts are the problem, to work around the issue for now I did a git clone of ansible's current code (1.7) and things are working again.
git clone https://github.com/ansible/ansible.git ~/src/github.com/ansible/ansible
source ~/src/github.com/ansible/ansible/hacking/env-setup
Then you can proceed with ansible-playbook as expected.
@rricard - maybe, time to update ansible's version? pip -upgrade ansible only got me to 1.6.10 so had to git clone to get 1.7, though perhaps that'll be finished before Yosemite is public.
Is there a way to have a list of gems installed in each ruby that is installed?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.