Paul Belanger e2acef2597 Add os-client-config support
Change-Id: I6dd96af86d8a080ff7a6f5700f8b52e3ad770151
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2015-11-20 15:50:48 -05:00

65 lines
1.8 KiB
YAML

# Copyright 2015 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
---
- name: Create system user account.
user:
createhome: yes
home: /var/lib/nodepool
name: nodepool
- name: Create required directories.
file:
group: nodepool
owner: nodepool
path: "{{ item }}"
state: directory
with_items:
- /etc/nodepool
- "{{ nodepool_config_images_dir }}"
- /var/lib/nodepool/.config/openstack
- /var/log/nodepool
- name: Template clouds yaml file.
template:
dest: "{{ nodepool_template_clouds_yaml_dest }}"
src: "{{ nodepool_template_clouds_yaml_src }}"
notify: Restart nodepool
- name: Template secure configuration file.
template:
dest: "{{ nodepool_template_secure_conf_dest }}"
src: "{{ nodepool_template_secure_conf_src }}"
notify: Restart nodepool
- name: Template yaml configuration file.
template:
dest: "{{ nodepool_template_nodepool_yaml_dest }}"
src: "{{ nodepool_template_nodepool_yaml_src }}"
notify: Restart nodepool
- name: Copy sudoers file into place.
copy:
dest: /etc/sudoers.d/nodepool
group: root
mode: 0440
owner: root
src: nodepool.sudoers
validate: '/usr/sbin/visudo -cf %s'
- name: Copy logging configuration file.
copy:
dest: "{{ nodepool_config_log_config }}"
src: "{{ nodepool_file_logging_conf }}"
notify: Restart nodepool