
Ansible for installing: Chef(host) Cobbler Compass Currently only three components being on the same host is supported. Change-Id: I1f36ee77546d3e5734a69660dde9edc41dc8ea13
31 lines
875 B
YAML
31 lines
875 B
YAML
---
|
|
|
|
- name: fact of chef-server
|
|
command: rpm -qa | grep -q chef-server
|
|
register: is_installed
|
|
|
|
- name: get chef-server
|
|
get_url: url={{ chef_server_el6_rpm }}
|
|
dest=/tmp/chef-server.rpm
|
|
when: is_installed.stdout.find('chef-server') == -1 and ansible_distribution_major_version == '6'
|
|
|
|
- name: install chef-server
|
|
shell: rpm -Uvh /tmp/chef-server.rpm
|
|
when: "'chef-server' not in is_installed.stdout"
|
|
|
|
- name: is chef-client installed
|
|
command: rpm -q chef
|
|
register: chefclient_installed
|
|
|
|
- name: get chef-client
|
|
get_url: url={{ chef_client_el6_rpm }}
|
|
dest=/tmp/chef-client.rpm
|
|
when: chefclient_installed.stdout.find('chef') == -1 and ansible_distribution_major_version == '6'
|
|
|
|
- name: install chef-client
|
|
shell: rpm -Uvh /tmp/chef-client.rpm
|
|
when: chefclient_installed.stdout.find('chef') == -1
|
|
|
|
- name: install git
|
|
yum: name=git
|