blob: bfc3fc5644f90d3e10ec52982e10bde5f88fd651 [file] [log] [blame]
Zack Williams41513bf2018-07-07 20:08:35 -07001# Copyright 2017-present Open Networking Foundation
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
Sergio Slobodrianee4b2bc2017-06-05 10:08:59 -040014- name: JQ is present
15 apt:
16 name: jq
17 force: yes
Sergio Slobodriand24189e2017-06-10 23:27:15 -040018 when: target != "cluster"
Sergio Slobodrianee4b2bc2017-06-05 10:08:59 -040019 tags: [common]
20
21- name: Host is present
22 lineinfile:
23 dest: /etc/hosts
24 regexp: "^{{ item.host_ip }}"
25 line: "{{ item.host_ip }} {{ item.host_name }}"
26 with_items: "{{ hosts }}"
27 tags: [common]
28
Stephane Barbarie2cbffca2018-03-26 16:20:03 -040029- name: GlusterFS repository is available
30 apt_repository:
31 repo: 'ppa:gluster/glusterfs-3.13'
32 when: target != "cluster"
33 tags: [common]
34
Sergio Slobodrianee4b2bc2017-06-05 10:08:59 -040035- name: Latest apt packages
36 apt:
37 name: "{{ item }}"
38 with_items: "{{ use_latest_for }}"
39 when: target != "cluster"
40 tags: [common]
41
Sergio Slobodrianba9cbd82017-06-22 11:45:49 -040042#- name: Services are not running
43# service:
44# name: "{{ item }}"
45# state: stopped
46# ignore_errors: yes
47# with_items: "{{ obsolete_services }}"
48# tags: [common]
Sergio Slobodrianee4b2bc2017-06-05 10:08:59 -040049
50- name: Ensure there is a .ssh directory for /root
51 file:
52 path: "{{ ansible_env['HOME'] }}/.ssh"
53 state: directory
54 owner: root
55 group: root
56
57- name: Ensure known_hosts file is absent
58 file:
59 path: "{{ ansible_env['HOME'] }}/.ssh/known_hosts"
60 state: absent
61
62- name: Disable Known Host Checking
63 copy:
64 src: files/ssh_config
65 dest: "{{ ansible_env['HOME'] }}/.ssh/config"
66 owner: root
67 group: root
68 mode: 0600