User Tools

Site Tools


сервис_ansible

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
сервис_ansible [2020/10/16 15:25]
val [Использование playbook]
сервис_ansible [2020/10/27 14:12]
val [Пример 2]
Line 95: Line 95:
   user: vagrant   user: vagrant
   tasks:   tasks:
-    - name: Install ​docker requirement +    - name: Install ​Docker'​s prequirement 
-      apt:  +      apt: 
-        pkg: +        pkg:
           - apt-transport-https           - apt-transport-https
           - ca-certificates           - ca-certificates
Line 105: Line 105:
         state: present ​         state: present ​
         update_cache:​ true         update_cache:​ true
 +    - name: Add Docker'​s official GPG key
 +      apt_key:
 +        url: https://​download.docker.com/​linux/​debian/​gpg
 +        state: present
 +    - name: Add Docker'​s repository into sources list
 +      apt_repository:​
 +        repo: deb [arch=amd64] https://​download.docker.com/​linux/​debian buster stable
 +        state: present
 +    - name: Install Docker
 +      apt: pkg=docker-ce state=present update_cache=true
 </​code><​code>​ </​code><​code>​
 λ vagrant rsync λ vagrant rsync
Line 116: Line 126:
 node1# cat addusers.yml node1# cat addusers.yml
 </​code><​code>​ </​code><​code>​
-- hosts: ​corp2+- hosts: ​corpX
   tasks:   tasks:
     - name: Add user1     - name: Add user1
сервис_ansible.txt · Last modified: 2024/04/22 16:45 by val