Matteo Scandolo | 3896c47 | 2017-08-01 13:31:42 -0700 | [diff] [blame] | 1 | |
| 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 Williams | 5223dd9 | 2017-02-28 23:38:02 -0700 | [diff] [blame] | 17 | --- |
| 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 Chu | 83723ec | 2017-10-05 17:54:14 -0700 | [diff] [blame] | 31 | -a "url=http://opencord.org validate_certs=no" |
Andy Bavier | ef3b02a | 2017-12-13 11:25:26 -0700 | [diff] [blame] | 32 | register: result |
| 33 | until: result|success |
| 34 | retries: 3 |
| 35 | delay: 5 |
Zack Williams | 5223dd9 | 2017-02-28 23:38:02 -0700 | [diff] [blame] | 36 | tags: |
| 37 | - skip_ansible_lint # connectivity check |
| 38 | |
| 39 | - name: Update CA certificates in containers |
| 40 | command: > |
| 41 | ansible containers -b -u ubuntu |
| 42 | -m command |
| 43 | -a "update-ca-certificates" |
| 44 | tags: |
| 45 | - skip_ansible_lint # running a sub job |
| 46 | |
| 47 | - name: Have containers use the apt-cache |
Zack Williams | fe284a1 | 2017-07-01 11:00:04 -0700 | [diff] [blame] | 48 | when: use_apt_cache |
Zack Williams | 5223dd9 | 2017-02-28 23:38:02 -0700 | [diff] [blame] | 49 | command: > |
| 50 | ansible containers -b -u ubuntu |
| 51 | -m lineinfile |
| 52 | -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') }}\"; };'" |
| 53 | tags: |
| 54 | - skip_ansible_lint # running a sub job |
| 55 | |
| 56 | - name: Update apt cache |
| 57 | command: > |
| 58 | ansible containers -b -u ubuntu |
| 59 | -m apt |
| 60 | -a "update_cache=yes cache_valid_time=3600" |
| 61 | tags: |
| 62 | - skip_ansible_lint # running a sub job |
| 63 | |
| 64 | - name: Update software in all the containers |
| 65 | when: run_dist_upgrade |
| 66 | command: > |
| 67 | ansible containers -b -u ubuntu |
| 68 | -m apt |
| 69 | -a "upgrade=dist" |
| 70 | tags: |
| 71 | - skip_ansible_lint # running a sub job |
| 72 | |