Xicheng Chang 31a3c755f4 Update: add ansible code
Ansible for installing:
Chef(host)
Cobbler
Compass
Currently only three components being on the same host is supported.

Change-Id: I1f36ee77546d3e5734a69660dde9edc41dc8ea13
2015-01-28 10:46:52 -08:00

18 lines
454 B
YAML

---
- name: make knife directory
file: path=~/.chef state=directory
- name: copy knife setup script
copy: src=knife.sh dest=/tmp/knife.sh mode=0755
- name: check if knife is already configured
command: ls ~/.chef
register: result
- name: run knife setup script
shell: /tmp/knife.sh >> knife.txt chdir=/tmp/
when: result.stdout.find('root') == -1
- name: replace knife config file
copy: src=knife.rb dest=/root/.chef/knife.rb mode=0644