Initial commit
This commit is contained in:
commit
dfa0e72d5f
18
meta/main.yml
Normal file
18
meta/main.yml
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
dependencies: []
|
||||||
|
|
||||||
|
galaxy_info:
|
||||||
|
role_name: teach-adlin
|
||||||
|
author: 'Pierre-Olivier Mercier <nemunaire+iac@nemunai.re>'
|
||||||
|
description: Prepare things for the AdLin course at EPITA
|
||||||
|
license: GPL-3.0-or-later
|
||||||
|
min_ansible_version: 2.9
|
||||||
|
platforms:
|
||||||
|
- name: Alpine
|
||||||
|
versions:
|
||||||
|
- all
|
||||||
|
- name: Debian
|
||||||
|
versions:
|
||||||
|
- all
|
||||||
|
galaxy_tags: []
|
23
tasks/main.yml
Normal file
23
tasks/main.yml
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
---
|
||||||
|
- name: Create user for software deployment
|
||||||
|
ansible.builtin.user:
|
||||||
|
name: srs-deploy
|
||||||
|
home: /var/www/nemunai.re/srs
|
||||||
|
create_home: false
|
||||||
|
password: '*'
|
||||||
|
state: present
|
||||||
|
|
||||||
|
- name: Ensure srs-deploy home exists
|
||||||
|
file:
|
||||||
|
path: "/var/www/nemunai.re/{{ item }}"
|
||||||
|
owner: root
|
||||||
|
state: directory
|
||||||
|
loop:
|
||||||
|
- srs
|
||||||
|
- adlin
|
||||||
|
|
||||||
|
- name: Define authorized key for srs-deploy
|
||||||
|
ansible.posix.authorized_key:
|
||||||
|
user: srs-deploy
|
||||||
|
state: present
|
||||||
|
key: "{{ ssh_key_srs_deploy }}"
|
2
vars/main.yml
Normal file
2
vars/main.yml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
---
|
||||||
|
ssh_key_srs_deploy: 'no-agent-forwarding,no-port-forwarding,no-pty,no-X11-forwarding,from="192.168.0.*,82.64.31.248,82.64.151.41,2a01:e0a:518:83?:*" ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAKp9v6Tktuw5Frym+RF14ahHGrdlM4bXuVhrAxWYUgy deploy-key-drone'
|
Loading…
Reference in New Issue
Block a user