2015-12-30 21:15:18 +00:00
|
|
|
---
|
2016-02-19 17:48:53 +00:00
|
|
|
- name: Bootstrap | Check if bootstrap is needed
|
|
|
|
raw: stat /opt/bin/.bootstrapped
|
2015-12-30 21:15:18 +00:00
|
|
|
register: need_bootstrap
|
2018-10-20 14:13:54 +00:00
|
|
|
environment: {}
|
2016-12-27 11:38:54 +00:00
|
|
|
failed_when: false
|
2017-11-06 13:51:07 +00:00
|
|
|
changed_when: false
|
2017-10-05 07:43:04 +00:00
|
|
|
tags:
|
|
|
|
- facts
|
2015-12-30 21:15:18 +00:00
|
|
|
|
2018-05-08 19:32:52 +00:00
|
|
|
- name: Force binaries directory for Container Linux by CoreOS
|
|
|
|
set_fact:
|
|
|
|
bin_dir: "/opt/bin"
|
|
|
|
tags:
|
|
|
|
- facts
|
|
|
|
|
2016-02-19 17:48:53 +00:00
|
|
|
- name: Bootstrap | Run bootstrap.sh
|
2015-12-30 21:15:18 +00:00
|
|
|
script: bootstrap.sh
|
2017-09-20 13:30:09 +00:00
|
|
|
when: need_bootstrap.rc != 0
|
2015-12-30 21:15:18 +00:00
|
|
|
|
|
|
|
- set_fact:
|
2018-05-08 19:32:52 +00:00
|
|
|
ansible_python_interpreter: "{{ bin_dir }}/python"
|
2017-10-05 07:43:04 +00:00
|
|
|
tags:
|
|
|
|
- facts
|
2015-12-30 21:15:18 +00:00
|
|
|
|
2019-01-12 14:05:33 +00:00
|
|
|
- name: Bootstrap | Install pip3
|
|
|
|
command: "{{ ansible_python_interpreter }} -m ensurepip"
|
|
|
|
args:
|
|
|
|
creates: "{{ bin_dir }}/pypy3/bin/pip3"
|
|
|
|
register: pip_installed
|
|
|
|
|
|
|
|
- name: Bootstrap | Install pip3 link
|
|
|
|
file:
|
|
|
|
src: "{{ bin_dir }}/pypy3/bin/pip3"
|
2019-01-02 14:17:20 +00:00
|
|
|
dest: "{{ bin_dir }}/pip3"
|
2017-02-17 21:22:34 +00:00
|
|
|
mode: 0755
|
2019-01-12 14:05:33 +00:00
|
|
|
state: link
|
|
|
|
when: pip_installed.changed
|
2015-12-30 21:15:18 +00:00
|
|
|
|
|
|
|
- name: Install required python modules
|
|
|
|
pip:
|
|
|
|
name: "{{ item }}"
|
2018-10-24 05:22:09 +00:00
|
|
|
extra_args: "{{ pip_extra_args | default(omit) }}"
|
2019-01-02 14:17:20 +00:00
|
|
|
with_items: "{{ pip_python_coreos_modules }}"
|
2018-05-08 19:32:52 +00:00
|
|
|
environment:
|
|
|
|
PATH: "{{ ansible_env.PATH }}:{{ bin_dir }}"
|
2018-08-14 18:42:16 +00:00
|
|
|
|
|
|
|
- name: Bootstrap | Disable auto-upgrade
|
2019-01-12 14:06:01 +00:00
|
|
|
systemd:
|
|
|
|
name: locksmithd.service
|
|
|
|
masked: true
|
|
|
|
state: stopped
|
2018-08-14 18:42:16 +00:00
|
|
|
when:
|
|
|
|
- not coreos_auto_upgrade
|