mirror of
https://github.com/BreizhHardware/cours-ISEN-MD.git
synced 2026-01-18 16:47:24 +01:00
Obisidian vault auto-backup: 12-01-2026 10:57:16 on . 5 files edited
This commit is contained in:
10
.obsidian/workspace.json
vendored
10
.obsidian/workspace.json
vendored
@@ -13,7 +13,7 @@
|
||||
"state": {
|
||||
"type": "markdown",
|
||||
"state": {
|
||||
"file": "ISEN/Cloud Computing/CIPA4/TP 2 Ansible.md",
|
||||
"file": "ISEN/Cloud Computing/CIPA4/TP 3 Ansible.md",
|
||||
"mode": "source",
|
||||
"source": false,
|
||||
"backlinks": true,
|
||||
@@ -28,7 +28,7 @@
|
||||
}
|
||||
},
|
||||
"icon": "lucide-file",
|
||||
"title": "TP 2 Ansible"
|
||||
"title": "TP 3 Ansible"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -206,9 +206,10 @@
|
||||
},
|
||||
"active": "e11a6a080eb83632",
|
||||
"lastOpenFiles": [
|
||||
"ISEN/Cloud Computing/CIPA4/TP 1 Ansible.md",
|
||||
"ISEN/Cloud Computing/CIPA4/TP 2 Ansible.md",
|
||||
"ISEN/Cloud Computing/CIPA4/Cloud Computing Cours 1.md",
|
||||
"ISEN/Cloud Computing/CIPA4/TP 3 Ansible.md",
|
||||
"ISEN/Cloud Computing/CIPA4/TP 2 Ansible.md",
|
||||
"ISEN/Cloud Computing/CIPA4/TP 1 Ansible.md",
|
||||
"ISEN/Réunion/CIPA 4/Réunion 8 janv 2026.md",
|
||||
"ISEN/Cloud Computing/CIPA4",
|
||||
"ISEN/Cloud Computing",
|
||||
@@ -242,7 +243,6 @@
|
||||
"Elevator.md",
|
||||
"ISEN/JAVA/CIPA4/TP/TP2/TP2.md",
|
||||
"ISEN/FHS/A1/Réunion stage associatif.md",
|
||||
"ISEN/FHS/A1/Démocratie/Démocracie cours 7.md",
|
||||
"Pasted image 20251009192656.png",
|
||||
"src/Pasted image 20240130111505.png",
|
||||
"src/Pasted image 20240123120819.png",
|
||||
|
||||
@@ -1,24 +1,7 @@
|
||||
#CIPA4 #CloudComputing #DP
|
||||
# Ansible
|
||||
## TP
|
||||
```Bash
|
||||
ssh root@135.125.246.84
|
||||
```
|
||||
mdp : moutard42
|
||||
|
||||
### Installation
|
||||
Install ansible on `localhost`
|
||||
|
||||
```text
|
||||
apt install ansible
|
||||
```
|
||||
|
||||
### Ad-hoc ping
|
||||
Q: What happened behing the scene?
|
||||
It ping the localhost.
|
||||
|
||||
### Ad-hoc shell
|
||||
Q: what command can you use to get the IP of your machine?
|
||||
```Bash
|
||||
ansible localhost -m shell -a "ip a"
|
||||
```
|
||||
Sujet des tp : https://git.arnaudmorin.fr/arnaud/trainings/src/branch/main/ansible/training/lessons
|
||||
TP1: [TP 1 Ansible](TP%201%20Ansible.md)
|
||||
TP2: [TP 2 Ansible](TP%202%20Ansible.md)
|
||||
TP3: [TP 3 Ansible](TP%203%20Ansible.md)
|
||||
@@ -3,7 +3,7 @@
|
||||
```Bash
|
||||
ssh root@135.125.246.84
|
||||
```
|
||||
mdp : moutard42
|
||||
mdp : moutarde42
|
||||
|
||||
### Installation
|
||||
Install ansible on `localhost`
|
||||
|
||||
@@ -1,29 +1,12 @@
|
||||
#CIPA4 #CloudComputing #DP #Ansible #TP
|
||||
## TP 1
|
||||
## TP 2
|
||||
```Bash
|
||||
ssh root@135.125.246.84
|
||||
```
|
||||
mdp : moutard42
|
||||
mdp : moutarde42
|
||||
|
||||
### Installation
|
||||
Install ansible on `localhost`
|
||||
|
||||
```text
|
||||
apt install ansible
|
||||
```
|
||||
|
||||
### Ad-hoc ping
|
||||
Q: What happened behing the scene?
|
||||
It ping the localhost.
|
||||
|
||||
### Ad-hoc shell
|
||||
Q: what command can you use to get the IP of your machine?
|
||||
### ping
|
||||
Now use an ansible ad-hoc module to check if ansible is able to connect to this machine
|
||||
```Bash
|
||||
ansible localhost -m shell -a "ip a"
|
||||
```
|
||||
|
||||
### Ad-hoc setup
|
||||
Q: using this module, what other command can you use to retrieve the ip of your host?
|
||||
```Bash
|
||||
ansible localhost -m setup -a "filter=ansible_default_ipv4"
|
||||
ansible demo -m ping
|
||||
```
|
||||
22
ISEN/Cloud Computing/CIPA4/TP 3 Ansible.md
Normal file
22
ISEN/Cloud Computing/CIPA4/TP 3 Ansible.md
Normal file
@@ -0,0 +1,22 @@
|
||||
#CIPA4 #CloudComputing #DP #Ansible #TP
|
||||
## TP 3
|
||||
```Bash
|
||||
ssh root@135.125.246.84
|
||||
```
|
||||
mdp : moutarde42
|
||||
|
||||
### Step2
|
||||
```yml
|
||||
---
|
||||
- hosts: demo
|
||||
gather_facts: yes
|
||||
tasks:
|
||||
- name: Install the git package
|
||||
apt:
|
||||
name: git
|
||||
state: present
|
||||
- name: Clone my flask application
|
||||
git:
|
||||
repo: 'https://github.com/arnaudmorin/demo-flask.git'
|
||||
dest: /root/demo-flask
|
||||
```
|
||||
Reference in New Issue
Block a user