增加自检打包和roles 规则

This commit is contained in:
root
2020-07-07 06:23:37 +08:00
parent 2c2efeade0
commit 9fc6d3f40c
6 changed files with 71 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
---
- name: "pull image from remote git registry"
docker_image:
name: "{{ item.name }}"
tag: "{{ item.tag }}"
source: pull
with_items: "{{ dockerImages }}"
- name: "add tag"
docker_image:
name: "{{ item.name }}"
repository: "{{ item.repo }}"
force_tag: yes
source: local
with_items: "{{ dockerImages2tags }}"
- name: "Archive image"
docker_image:
name: "{{ item.name }}"
tag: "{{ item.tag }}"
archive_path: "{{ item.tarpath }}"
source: local
with_items: "{{ dockerImagesTar }}"

View File

@@ -0,0 +1,8 @@
---
- name: "download rpm package by rpm list"
yum:
name: "{{ item.name }}"
state: present
download_only: true
download_dir: "{{ item.downpath }}"
with_dict: "{{ rpmlist }}"

View File

@@ -0,0 +1,6 @@
---
- name: "build install tar package"
archive:
path: "{{ tarpath.src }}"
dest: "{{ tarpath.destdict }}{{ tarname }}"
format: gz

View File

@@ -0,0 +1,3 @@
---
- include: ImageDownload.yml
- include: RpmDownload.yml