tags lesson completed
This commit is contained in:
12
playbooks/block_playbook.yml
Normal file
12
playbooks/block_playbook.yml
Normal 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!"
|
||||
19
playbooks/tags_playbook.yml
Normal file
19
playbooks/tags_playbook.yml
Normal 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
|
||||
Reference in New Issue
Block a user