This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://www.ipcpu.com/2016/01/ansible-setup-when/ | |
# 通过使用 ansible 的 setup 模块,可以将操作系统的版本变量获取并存储在 ansible 内置的变量中, 可以在脚本中直接引用. | |
- hosts: webserver | |
vars: | |
logserver: 10.127.2.170 | |
gather_facts: True | |
tasks: | |
- name: add conf to config files to CentOS6 | |
lineinfile: dest=/etc/rsyslog.conf line="*.* @{{ logserver }}" | |
when: ansible_distribution == 'CentOS' and ansible_distribution_major_version == "6" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[package] | |
name = "api_example" | |
version = "0.1.0" | |
authors = ["nicolov"] | |
[dependencies] | |
iron = "*" | |
router = "*" | |
mysql = "*" | |
r2d2 = "*" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# check for where the latest version of IDEA is installed | |
IDEA=`ls -1d /Applications/IntelliJ\ * | tail -n1` | |
wd=`pwd` | |
# were we given a directory? | |
if [ -d "$1" ]; then | |
# echo "checking for things in the working dir given" | |
wd=`ls -1d "$1" | head -n1` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<project name="sample-require-js" default="" basedir="."> | |
<!-- properties --> | |
<property name="r.js" value="_build/rjs/r.js" /> | |
<property name="closure.jar" value="_build/closure/compiler.jar" /> | |
<property name="rhino.jar" value="_build/rhino/js.jar" /> | |
<property name="js.build" value="_build/js.build.js" /> | |
<property name="css.build" value="_build/css.build.js" /> |