ansible: begin inventory
This commit is contained in:
37
ansible/arcodange/factory/inventory/hosts.yml
Normal file
37
ansible/arcodange/factory/inventory/hosts.yml
Normal file
@@ -0,0 +1,37 @@
|
||||
raspberries:
|
||||
hosts:
|
||||
pi1:
|
||||
ansible_host: pi1.home # setup http://192.168.1.1/ Réseau/DNS
|
||||
pi2:
|
||||
ansible_host: pi2.home
|
||||
|
||||
internetPi1:
|
||||
ansible_host: rg-evry.changeip.co
|
||||
ansible_port: 51022
|
||||
internetPi2:
|
||||
ansible_host: rg-evry.changeip.co
|
||||
ansible_port: 52022
|
||||
|
||||
vars:
|
||||
ansible_user: pi
|
||||
|
||||
local:
|
||||
hosts:
|
||||
pi1:
|
||||
pi2:
|
||||
|
||||
hard_disk:
|
||||
hosts:
|
||||
pi2 # 4To toshiba external hard drive (/dev/sda)
|
||||
|
||||
postgres:
|
||||
children:
|
||||
hard_disk:
|
||||
|
||||
gitea:
|
||||
children:
|
||||
hard_disk:
|
||||
|
||||
all:
|
||||
children:
|
||||
raspberry:
|
||||
@@ -7,7 +7,7 @@
|
||||
# lsblk -fe7 -- uuid des partitions
|
||||
---
|
||||
- name: Setup Hard Disk
|
||||
hosts: pi2
|
||||
hosts: hard_disk
|
||||
gather_facts: yes
|
||||
become: yes
|
||||
|
||||
@@ -25,6 +25,15 @@
|
||||
loop_control:
|
||||
loop_var: mount_point
|
||||
|
||||
- name: Set permissions for group docker on /arcodange
|
||||
ansible.builtin.file:
|
||||
path: /arcodange
|
||||
state: directory
|
||||
recurse: yes
|
||||
owner: pi
|
||||
group: docker
|
||||
mode: u=rwX,g=rX,o=rX
|
||||
|
||||
- name: Set ACL for group docker on /arcodange
|
||||
ansible.posix.acl:
|
||||
path: "/arcodange"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
- name: setup
|
||||
hosts: all
|
||||
hosts: raspberries:&local
|
||||
|
||||
tasks:
|
||||
- name: hello world
|
||||
@@ -8,4 +8,5 @@
|
||||
msg: Hello world!
|
||||
|
||||
- name: setup hard disk
|
||||
ansible.builtin.import_playbook: hard_disk.yml
|
||||
ansible.builtin.import_playbook: hard_disk.yml
|
||||
tags: never
|
||||
Reference in New Issue
Block a user