-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprepare.yml
29 lines (25 loc) · 824 Bytes
/
prepare.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
---
- name: prepare for internal network env setup
hosts: all
gather_facts: False
pre_tasks:
# For Mac OS X env
# See: https://github.com/ansible/ansible-modules-core/issues/4246
# Don't forget add ansible_python_interpreter=/usr/local/bin/python in inventory
- name: install docker-py
command: pip install docker-py
roles:
- { role: get_lists, tags: get_lists }
- { role: pull_images, tags: pull_images }
- { role: pull_helm_pkgs, tags: pull_helm_pkgs }
post_tasks:
- name: check if list.yml exists
stat: path=list.yml
register: list
- name: remove list.yml if it exists
file:
state: absent
path: list.yml
when: list.stat.exists == True
- name: generate list.yml
local_action: copy content={{ images }} dest=list.yml