8cbd40cbc5
This PS introduces two new roles: - airship-images-configure-docker: Configures docker logging driver to journald - airship-gather-runtime-logs Collects all journald logs for docker and containerd Also changes have been made to debian-isogen Makefile to completely output docker build logs instead of just image ID. Relates-To: #89 Change-Id: I435106b2ad15921367174446707179f157df7946 Signed-off-by: Vamsi Savaram <vamsi.savaram@gmail.com>
44 lines
1.4 KiB
YAML
44 lines
1.4 KiB
YAML
# 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: Check if docker daemon configuration exists
|
|
stat:
|
|
path: "{{ docker_config_path }}/daemon.json"
|
|
register: docker_config_stat
|
|
|
|
- name: Load docker daemon configuration
|
|
slurp:
|
|
path: "{{ docker_config_path }}/daemon.json"
|
|
register: docker_config
|
|
when: docker_config_stat.stat.exists
|
|
|
|
- name: Parse docker daemon configuration
|
|
set_fact:
|
|
docker_config: "{{ docker_config.content | b64decode | from_json }}"
|
|
when: docker_config_stat.stat.exists
|
|
|
|
- name: Append to docker daemon configuration
|
|
set_fact:
|
|
docker_config: "{{ docker_config | default({}) | combine(docker_config_append) }}"
|
|
|
|
- name: Save docker daemon configuration
|
|
copy:
|
|
content: "{{ docker_config | to_nice_json }}"
|
|
dest: "{{ docker_config_path }}/daemon.json"
|
|
become: true
|
|
|
|
- name: "Restart docker service"
|
|
service:
|
|
name: docker
|
|
state: restarted
|
|
become: true
|