Skip to content
Snippets Groups Projects
Commit b30e8611 authored by Maarten de Waard's avatar Maarten de Waard :angel:
Browse files

Merge branch '108_update_package_cache' into 'master'

108 update package cache

Closes #108 and #94

See merge request openappstack/bootstrap!64
parents b64ed468 96b067e8
Branches
Tags
No related merge requests found
---
- hosts: all
gather_facts: False
pre_tasks:
- name: Require minimal ansible version
assert:
......@@ -8,7 +9,7 @@
msg: >
"You must update Ansible to at least 2.6 to bootstrap your OAS cluster."
- name: Release name must start with lower case
- name: Release name must start with lower case
assert:
that: "'{{ release_name }}' is match('^[a-z]')"
msg: >
......
---
- name: Set configuration directory
set_fact:
configuration_directory: "{{ configuration_directory }}"
- name: Install snapd, git and curl
- name: Update apt packages cache and install needed packages
# apt-transport-https is needed for docker apt repo
# curl and git is needed for helm plugin install
package:
# iptables-persistent for persistant firewall rules
apt:
state: present
name:
- snapd
- apt-transport-https
- curl
- git
- iptables-persistent
- snapd
# Update again after 1 day
cache_valid_time: 86400
update_cache: yes
- name: Set configuration directory
set_fact:
configuration_directory: "{{ configuration_directory }}"
- name: Install helm snap
# helm needs to get installed as "classic" snap
......
---
- name: Install some apt dependencies
apt:
name:
- "apt-transport-https"
become: true
- name: Install docker apt repo key
apt_key:
url: "https://download.docker.com/linux/debian/gpg"
......@@ -15,10 +9,10 @@
- name: Add docker apt repo
apt_repository:
repo: "deb [arch=amd64] https://download.docker.com/linux/debian {{ ansible_facts['lsb']['codename'] }} stable"
update_cache: true
become: true
- name: Install docker
apt:
package:
name: "docker-ce={{ docker_version }}"
update_cache: true
become: true
......@@ -19,13 +19,6 @@
jump: "ACCEPT"
become: true
- name: Make sure netfilter-persistent is installed
apt:
name:
- "netfilter-persistent"
update_cache: true
become: true
- name: Save changes to iptables rules
shell: netfilter-persistent save
become: true
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment