mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-05-09 10:27:39 -02:30
bootstrap: rework role (#4045)
* bootstrap: rework role * support being called from a non-root user * run some commands in check mode * unify spelling/task names * bootstrap: fix wording of comments for check_mode: false * bootstrap: remove setup-pipelining task
This commit is contained in:
committed by
Kubernetes Prow Robot
parent
038a2eb862
commit
e2ad6aad5a
@@ -1,5 +1,5 @@
|
||||
---
|
||||
- name: check if atomic host
|
||||
- name: Check if atomic host
|
||||
stat:
|
||||
path: /run/ostree-booted
|
||||
register: ostree
|
||||
@@ -19,24 +19,25 @@
|
||||
regexp: "^enabled=.*"
|
||||
line: "enabled=0"
|
||||
state: present
|
||||
become: true
|
||||
when: fastestmirror.stat.exists
|
||||
|
||||
- name: Add proxy to /etc/yum.conf if http_proxy is defined
|
||||
lineinfile:
|
||||
path: "/etc/yum.conf"
|
||||
line: "proxy={{http_proxy}}"
|
||||
line: "proxy={{ http_proxy }}"
|
||||
create: yes
|
||||
state: present
|
||||
become: true
|
||||
when: http_proxy is defined
|
||||
|
||||
- name: Install libselinux-python and yum-utils for bootstrap
|
||||
yum:
|
||||
name: "{{ packages }}"
|
||||
state: present
|
||||
vars:
|
||||
packages:
|
||||
name:
|
||||
- libselinux-python
|
||||
- yum-utils
|
||||
state: present
|
||||
become: true
|
||||
when:
|
||||
- not is_atomic
|
||||
|
||||
@@ -51,6 +52,7 @@
|
||||
yum:
|
||||
name: epel-release
|
||||
state: present
|
||||
become: true
|
||||
when:
|
||||
- epel_enabled
|
||||
- not is_atomic
|
||||
@@ -82,6 +84,7 @@
|
||||
yum:
|
||||
name: python-pip
|
||||
state: present
|
||||
become: true
|
||||
when:
|
||||
- not is_atomic
|
||||
- package_python_pip.results | length != 0
|
||||
|
||||
Reference in New Issue
Block a user