blob: bfc3fc5644f90d3e10ec52982e10bde5f88fd651 [file] [log] [blame]
# Copyright 2017-present Open Networking Foundation
#
# 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: JQ is present
apt:
name: jq
force: yes
when: target != "cluster"
tags: [common]
- name: Host is present
lineinfile:
dest: /etc/hosts
regexp: "^{{ item.host_ip }}"
line: "{{ item.host_ip }} {{ item.host_name }}"
with_items: "{{ hosts }}"
tags: [common]
- name: GlusterFS repository is available
apt_repository:
repo: 'ppa:gluster/glusterfs-3.13'
when: target != "cluster"
tags: [common]
- name: Latest apt packages
apt:
name: "{{ item }}"
with_items: "{{ use_latest_for }}"
when: target != "cluster"
tags: [common]
#- name: Services are not running
# service:
# name: "{{ item }}"
# state: stopped
# ignore_errors: yes
# with_items: "{{ obsolete_services }}"
# tags: [common]
- name: Ensure there is a .ssh directory for /root
file:
path: "{{ ansible_env['HOME'] }}/.ssh"
state: directory
owner: root
group: root
- name: Ensure known_hosts file is absent
file:
path: "{{ ansible_env['HOME'] }}/.ssh/known_hosts"
state: absent
- name: Disable Known Host Checking
copy:
src: files/ssh_config
dest: "{{ ansible_env['HOME'] }}/.ssh/config"
owner: root
group: root
mode: 0600