Éric Lemoine 32a4cadac9 Add cron image and playbook
Add cron image and playbook for logrotate.

The "common" Ansible playbook includes configuration files for
logrotate. At this point the operator cannot customize/override the
logrotate configuration.

Closes-Bug: #1553244
Change-Id: Ic9fdda9a273c9ccd90502f0acc7614d2c7157dca
2016-03-09 13:53:55 +01:00

93 lines
2.3 KiB
YAML

---
- name: Looking up storage hostname
command: getent hosts {{ hostvars[inventory_hostname]['ansible_' + storage_interface]['ipv4']['address'] }}
changed_when: False
register: storage_hostname
- name: Setting storage hostname
set_fact:
storage_hostname: "{{ storage_hostname.stdout.split()[1] }}"
- name: Ensuring config directories exist
file:
path: "{{ node_config_directory }}/{{ item }}"
state: "directory"
recurse: yes
with_items:
- "heka"
- "cron"
- "cron/logrotate"
- name: Copying over config.json files for services
template:
src: "{{ item }}.json.j2"
dest: "{{ node_config_directory }}/{{ item }}/config.json"
with_items:
- "heka"
- "cron"
- name: Copying over heka config files
template:
src: "heka-{{ item }}.toml.j2"
dest: "{{ node_config_directory }}/heka/heka-{{ item }}.toml"
with_items:
- "global"
- "haproxy"
- "rabbitmq"
- "openstack"
- "mariadb"
- "keystone"
- "elasticsearch"
- name: Copying over heka swift config files
template:
src: "heka-swift.toml.j2"
dest: "{{ node_config_directory }}/heka/heka-{{ item }}.toml"
with_items:
- "swift-account-auditor"
- "swift-account-reaper"
- "swift-account-replicator"
- "swift-account-server"
- "swift-container-auditor"
- "swift-container-replicator"
- "swift-container-server"
- "swift-container-updater"
- "swift-object-auditor"
- "swift-object-expirer"
- "swift-object-replicator"
- "swift-object-server"
- "swift-object-updater"
- "swift-proxy-server"
- "swift-rsyncd"
- name: Copying over heka elasticsearch config file
template:
src: "heka-{{ item }}.toml.j2"
dest: "{{ node_config_directory }}/heka/heka-{{ item }}.toml"
with_items:
- "elasticsearch"
when: "{{ enable_central_logging | bool }}"
- name: Copying over cron logrotate config files
template:
src: "cron-logrotate-{{ item }}.conf.j2"
dest: "{{ node_config_directory }}/cron/logrotate/{{ item }}.conf"
with_items:
- "ansible"
- "cinder"
- "glance"
- "global"
- "haproxy"
- "heat"
- "keepalived"
- "keystone"
- "magnum"
- "manila"
- "mariadb"
- "mistral"
- "murano"
- "neutron"
- "nova"
- "rabbitmq"
- "swift"