system-config/playbooks/roles/install-ansible/tasks/main.yaml
Monty Taylor 03d09b777e
Use openstack and groups inventory from system-config
Rather than copying these out of system-config inside of
install-ansible, just point the ansible.cfg to them in the system-config
location. This way as changes come in that have group updates we don't
have to first apply them to the system.

Change-Id: I1cefd7848b7f3f1adc8fbfa080eb9831124a297b
2018-08-17 11:47:13 -05:00

47 lines
1.0 KiB
YAML

- name: Install ansible
pip:
name: ansible
- name: Install openstacksdk
pip:
name: openstacksdk
- name: Ensure /etc/ansible and /etc/ansible/hosts
file:
state: directory
path: /etc/ansible/hosts
- name: Ensure /etc/ansible/inventory_plugins
file:
state: directory
path: /etc/ansible/inventory_plugins
- name: Ensure /var/cache/ansible
file:
state: directory
path: /var/cache/ansible
owner: root
group: admin
mode: 0770
- name: Ensure ansible log file is writable
file:
path: /var/log/ansible.log
state: touch
owner: root
group: admin
mode: 0660
- name: Copy ansible.cfg in to place
copy:
src: ansible.cfg
dest: /etc/ansible/ansible.cfg
# NOTE(mordred) The copy of the openstack inventory plugin from 2.6 is busted.
# It doesn't proerly deal with caching. A fix has been submitted upstream, but
# for now this is a fixed copy.
- name: Copy fixed openstack inventory in place
copy:
src: openstack.py
dest: /etc/ansible/inventory_plugins/openstack.py