It's designed to always be used from the latest version. This trips an ansible lint rule (ANSIBLE0010) which we can ignore, as we often have pip things that we want to install the latest release of automatically. Change-Id: Ieac93ab3a555f2423d4fbcf101d6d9681ae0e497
59 lines
1.3 KiB
YAML
59 lines
1.3 KiB
YAML
- name: Install ansible
|
|
pip:
|
|
name: ansible
|
|
|
|
- name: Install openstacksdk
|
|
pip:
|
|
state: latest
|
|
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: root
|
|
mode: 0770
|
|
|
|
- name: Ensure ansible log dir is writable
|
|
file:
|
|
path: /var/log/ansible
|
|
state: directory
|
|
owner: root
|
|
group: root
|
|
mode: 0775
|
|
|
|
- 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: inventory_plugins/openstack.py
|
|
dest: /etc/ansible/inventory_plugins/openstack.py
|
|
|
|
- name: Copy yamlgroup inventory in place
|
|
copy:
|
|
src: inventory_plugins/yamlgroup.py
|
|
dest: /etc/ansible/inventory_plugins/yamlgroup.py
|
|
|
|
- name: Setup log rotation
|
|
include_role:
|
|
name: logrotate
|
|
vars:
|
|
logrotate_file_name: /var/log/ansible/ansible.log
|