blob: cd8359eccd797ac973cbc3eb3ff86287a279cada [file] [log] [blame]
Matteo Scandolo3896c472017-08-01 13:31:42 -07001
2# Copyright 2017-present Open Networking Foundation
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
16
Zack Williams5223dd92017-02-28 23:38:02 -070017---
18# lxd-finish/tasks/main.yml
19
20- name: Verify that we can log into every container
21 command: >
22 ansible containers -u ubuntu
23 -m ping
24 tags:
25 - skip_ansible_lint # connectivity check
26
27- name: Verify that containers have external connectivity
28 command: >
29 ansible containers -u ubuntu
30 -m uri
Max Chub0471992017-10-05 17:54:14 -070031 -a "url=http://opencord.org validate_certs=no"
Zack Williams5223dd92017-02-28 23:38:02 -070032 tags:
33 - skip_ansible_lint # connectivity check
34
35- name: Update CA certificates in containers
36 command: >
37 ansible containers -b -u ubuntu
38 -m command
39 -a "update-ca-certificates"
40 tags:
41 - skip_ansible_lint # running a sub job
42
43- name: Have containers use the apt-cache
Zack Williamsfe284a12017-07-01 11:00:04 -070044 when: use_apt_cache
Zack Williams5223dd92017-02-28 23:38:02 -070045 command: >
46 ansible containers -b -u ubuntu
47 -m lineinfile
48 -a "dest=/etc/apt/apt.conf.d/02apt-cacher-ng create=yes mode=0644 owner=root group=root regexp='^Acquire' line='Acquire::http { Proxy \"http://{{ apt_cacher_name }}:{{ apt_cacher_port | default('3142') }}\"; };'"
49 tags:
50 - skip_ansible_lint # running a sub job
51
52- name: Update apt cache
53 command: >
54 ansible containers -b -u ubuntu
55 -m apt
56 -a "update_cache=yes cache_valid_time=3600"
57 tags:
58 - skip_ansible_lint # running a sub job
59
60- name: Update software in all the containers
61 when: run_dist_upgrade
62 command: >
63 ansible containers -b -u ubuntu
64 -m apt
65 -a "upgrade=dist"
66 tags:
67 - skip_ansible_lint # running a sub job
68