Ricardo Carrillo Cruz 150f550d89 Initial commit
2015-03-27 09:47:58 +01:00

32 lines
936 B
YAML

---
# Set hostname and /etc/hosts
# (Taken from https://github.com/ansible/ansible/pull/8482)
- set_fact: full_hostname="{{ inventory_hostname}}"
short_hostname="{{ inventory_hostname.split('.', 1)[0] }}"
# " lovely lonely double-quote for fixing vim highlighting
- hostname: name={{ short_hostname }}
- name: add hostname to /etc/hosts
lineinfile: dest=/etc/hosts
line='{{ hostvars[inventory_hostname]['openstack']['private_v4']}} {{ full_hostname }} {{ short_hostname }}'
insertafter='^127\.0\.0\.1'
state=present
# Update packages
- apt: update_cache=yes
# Install git
- apt: name=git
# Clone system-config
- git: repo=https://git.openstack.org/openstack-infra/system-config
dest=/opt/git/system-config
# Install puppet
- command: bash /opt/git/system-config/install_puppet.sh
# Install puppet modules
- command: bash /opt/git/system-config/install_modules.sh