tags lesson completed

This commit is contained in:
Ilgar_Naghiyev
2020-03-04 12:02:36 +01:00
parent e621c5ec33
commit 66478e651e
4 changed files with 89 additions and 1 deletions

View File

@@ -0,0 +1,12 @@
---
- hosts: labservers
tasks:
- name: get file
block:
- get_url:
url: "http://innaghiyev2c/index.html"
dest: "/tmp/index_file"
rescue:
- debug: msg="The file doesn't exists!"
always:
- debug: msg="Play done!"

View File

@@ -0,0 +1,19 @@
---
- hosts: web
become: yes
tasks:
- name: deploy app binary
copy:
src: /home/user/apps/hello
dest: /var/www/html/hello
tags:
- webdeploy
- hosts: db
become: yes
tasks:
- name: deploy db script
copy:
src: /home/user/apps/script.sql
dest: /opt/deb/scripts/script.sql
tags:
- dbdeploy