Инструменты пользователя

Инструменты сайта


playbooks

Различия

Показаны различия между двумя версиями страницы.

Ссылка на это сравнение

Следующая версия
Предыдущая версия
playbooks [2020/01/17 12:34]
kirill создано
playbooks [2020/01/17 15:36] (текущий)
Строка 1: Строка 1:
-''---\\ +Playbook-ping 
-- name: Test Connections to my servers\\ +--- 
-  hosts: all \\ +- name: Test Connections to my servers  
-  become: yes \\ +  hosts: all  
-  \\ +  become: yes  
-\\ +   
-\\ + 
-  tasks:\\  + 
-  - name: Ping my servers \\ +  tasks:  
-    ping:''\\+  - name: Ping my servers  
 +    ping: 
 + 
 + 
 + 
 + 
 +Playbook установка httpd  
 + 
 +--- 
 +- name: install default apache webserver  
 +  hosts : all  
 +  become: yes  
 + 
 + 
 + 
 +  tasks: 
 +  - name: install apache webserver 
 +    yum: name=httpd state=latest 
 +   
 + 
 +  - name: start and enable apache  
 +    service: name=httpd state=started enabled=yes 
 + 
 + 
 + 
 +Playbook - установка httpd с хендлерами  
 + 
 +--- 
 +- name : install apache and upload web page  
 +  hosts: all  
 +  become: yes  
 + 
 +  vars: 
 +   source_file: ./mysite/index.html 
 +   dest_file : /var/www/html 
 + 
 +  tasks:  
 +  - name: Install Apache  
 +    yum: name=httpd state=latest  
 +  
 + 
 +  - name: copy content  
 +    copy: src={{ source_file }} dest={{dest_file}} 
 +    notify: restart apache 
 + 
 +  - name: start and enable httpd  
 +    service: name=httpd state=started enabled=yes  
 + 
 + 
 + 
 +  handlers: 
 +  - name : restart apache 
 +    service: name=httpd state=restarted  
 + 
 + 
 + 
 + 
 +     
playbooks.1579264446.txt.gz · Последнее изменение: 2020/01/17 15:34 (внешнее изменение)

DokuWiki Appliance - Powered by TurnKey Linux