Define and implement specs for bootstrap-os (#4455)

* Add README to bootstrap-os role

* Rework bootstrap-os once more

* Document workarounds for bugs/deficiencies in Ansible modules
* Unify and document role variables
* Remove installation of additional packages and repositories
* Merge Ubuntu and Debian tasks
* Remove pipelining setting from default playbooks
* Fix OpenSUSE not running its required tasks
This commit is contained in:
MarkusTeufelberger
2019-04-24 00:46:02 +02:00
committed by Kubernetes Prow Robot
parent d588532c9b
commit 76db060afb
12 changed files with 175 additions and 229 deletions

View File

@@ -1,17 +1,16 @@
---
# Some Debian based distros ship without Python installed
- name: Check if bootstrap is needed
raw: which "{{ item }}"
raw: which python
register: need_bootstrap
failed_when: false
changed_when: false
# This command should always run, even in check mode
check_mode: false
with_items:
- python
- pip
- dbus-daemon
environment: {}
tags: facts
tags:
- facts
- name: Check http::proxy in /etc/apt/apt.conf
raw: grep -qsi 'Acquire::http::proxy' /etc/apt/apt.conf
@@ -51,15 +50,18 @@
- https_proxy is defined
- need_https_proxy.rc != 0
- name: Install python, pip, and dbus
- name: Install python
raw:
apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y python-minimal python-pip dbus
DEBIAN_FRONTEND=noninteractive apt-get install -y python-minimal
become: true
environment: {}
when:
need_bootstrap.results | map(attribute='rc') | sort | last | bool
- need_bootstrap.rc != 0
- set_fact:
ansible_python_interpreter: "/usr/bin/python"
tags: facts
# Workaround for https://github.com/ansible/ansible/issues/25543
- name: Install dbus for the hostname module
package:
name: dbus
state: present
become: true