Ausgaben separate Blöcke

Michael Schaar 2023-09-21 13:48:14 +02:00
parent 35605d4a54
commit db2970c0f9
1 changed files with 13 additions and 3 deletions

@ -18,7 +18,7 @@ foo RUNNING 0 - 10.0.3.110 - false
Mit der IP kann man sich via ssh einlogen:
```
ssh ubuntu@10.0.3.110
ssh ubuntu@10.0.3.110 # Mit exit wieder zurück auf rdf-dev
sudo lxc-create --name baa --template ubuntu
sudo lxc-start --name baa
sudo lxc-ls --fancy
@ -37,7 +37,7 @@ whatis nmap
nmap (1) - Netzwerk-Analysewerkzeug und Sicherheits-/Portscanner
```
```bash
ssh ubuntu@10.0.3.110
ssh ubuntu@10.0.3.110 # Mit exit zurück
dig @10.0.3.1 foo
ping -c 4 10.0.3.110
ping -c 4 10.0.3.55
@ -52,6 +52,8 @@ ansible --version
cd ~/ansible_lxc_bsa2/
vi inventory
cat inventory
```
```
[lokal]
localhost ansible_connection=local
```
@ -65,6 +67,8 @@ ansible -i inventory -m ping lokal
sudo lxc-ls --fancy
vi inventory
cat inventory
```
```
[lokal]
localhost ansible_connection=local
@ -77,6 +81,8 @@ localhost ansible_connection=local
ansible -i inventory -m ping notme
vi inventory
cat inventory
```
```
[lokal]
localhost ansible_connection=local
@ -84,17 +90,21 @@ localhost ansible_connection=local
10.0.3.110 ansible_user=ubuntu
10.0.3.55 ansible_user=ubuntu
```
```bash
ansible -i inventory -m ping notme
vi inventory
cat inventory
```
```
[lokal]
localhost ansible_connection=local
[notme]
10.0.3.110 ansible_user=ubuntu ansible_password=ubuntu
10.0.3.55 ansible_user=ubuntu ansible_password=ubuntu
```
```bash
ansible -i inventory -m ping notme
ansible -i inventory -m ping all
```