Use ansible-galaxy for external roles
This commit is contained in:
parent
a32926b0b9
commit
1fe1ce6bbc
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -1,5 +1,8 @@
|
||||||
|
# Directories
|
||||||
ENV/
|
ENV/
|
||||||
tmp/
|
tmp/
|
||||||
|
|
||||||
|
# Files
|
||||||
*.retry
|
*.retry
|
||||||
*.swp
|
*.swp
|
||||||
|
ansible.cfg
|
||||||
|
|
6
.gitmodules
vendored
6
.gitmodules
vendored
|
@ -1,6 +0,0 @@
|
||||||
[submodule "roles/basics"]
|
|
||||||
path = roles/basics
|
|
||||||
url = https://github.com/7adietri/ansible-basics.git
|
|
||||||
[submodule "roles/nginx"]
|
|
||||||
path = roles/nginx
|
|
||||||
url = https://github.com/7adietri/ansible-nginx.git
|
|
16
README.md
16
README.md
|
@ -8,9 +8,21 @@ erforderlich.
|
||||||
|
|
||||||
[ansible]: https://docs.ansible.com/ansible/latest/
|
[ansible]: https://docs.ansible.com/ansible/latest/
|
||||||
|
|
||||||
|
Abhängigkeiten installieren:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Abhängigkeiten installieren mit Ansible Galaxy
|
||||||
|
ansible-galaxy install -r requirements-galaxy.yml
|
||||||
|
|
||||||
|
# Abhängigkeiten installieren mit GitHub
|
||||||
|
ansible-galaxy install -r requirements-github.yml
|
||||||
|
```
|
||||||
|
|
||||||
## Anwenden der Konfiguration auf alle Server
|
## Anwenden der Konfiguration auf alle Server
|
||||||
|
|
||||||
|
```bash
|
||||||
./site
|
./site
|
||||||
|
```
|
||||||
|
|
||||||
Das Skript führt das Playbook `site.yml` aus. Zum Testen kann `-C` angehängt
|
Das Skript führt das Playbook `site.yml` aus. Zum Testen kann `-C` angehängt
|
||||||
werden.
|
werden.
|
||||||
|
@ -19,8 +31,12 @@ werden.
|
||||||
|
|
||||||
Einschränken auf bestimmte Tags, z.B. `nginx`:
|
Einschränken auf bestimmte Tags, z.B. `nginx`:
|
||||||
|
|
||||||
|
```bash
|
||||||
./site -t nginx
|
./site -t nginx
|
||||||
|
```
|
||||||
|
|
||||||
Einschränken auf bestimmte Server:
|
Einschränken auf bestimmte Server:
|
||||||
|
|
||||||
|
```bash
|
||||||
./site -l srv01
|
./site -l srv01
|
||||||
|
```
|
||||||
|
|
7
requirements-galaxy.yml
Normal file
7
requirements-galaxy.yml
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
---
|
||||||
|
- src: alxndr42.basics
|
||||||
|
name: basics
|
||||||
|
version: v1.11.0
|
||||||
|
- src: alxndr42.nginx
|
||||||
|
name: nginx
|
||||||
|
version: v1.4.0
|
7
requirements-github.yml
Normal file
7
requirements-github.yml
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
---
|
||||||
|
- src: https://github.com/alxndr42/ansible-basics.git
|
||||||
|
name: basics
|
||||||
|
version: v1.11.0
|
||||||
|
- src: https://github.com/alxndr42/ansible-nginx.git
|
||||||
|
name: nginx
|
||||||
|
version: v1.4.0
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit d859daa9e5a569af6a87d556a8add62b6ccffaab
|
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit 697304bf0278e894a673592676419b615982de82
|
|
Loading…
Reference in a new issue