This commit is contained in:
decentral1se 2022-05-31 07:36:48 +02:00
commit cb4e2091fd
No known key found for this signature in database
GPG Key ID: 03789458B3D0C410
8 changed files with 90 additions and 0 deletions

15
LICENSE Normal file
View File

@ -0,0 +1,15 @@
${REPO_NAME}: ${REPO_DESCRIPTION}
Copyright (C) 2022 Autonomic Co-operative <helo@autonomic.zone>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.

3
README.md Normal file
View File

@ -0,0 +1,3 @@
# ${REPO_NAME}
[![Build Status](https://drone.autonomic.zone/api/badges/autonomic-cooperative/${REPO_NAME}/status.svg?ref=refs/heads/main)](https://drone.autonomic.zone/autonomic-cooperative/${REPO_NAME})

14
meta/main.yml Normal file
View File

@ -0,0 +1,14 @@
---
dependencies: []
galaxy_info:
role_name: ${REPO_NAME_SNAKE}
namespace: autonomic
author: autonomic
description: ${REPO_DESCRIPTION}
company: Autonomic
license: GPLv3
min_ansible_version: 2.9
platforms:
- name: Debian
versions:
- buster

View File

@ -0,0 +1,28 @@
---
- name: Converge
hosts: all
vars:
members: files/members.yml
pre_tasks:
- name: Wait for Hetzner VPS networking to come up
pause:
seconds: 10
echo: false
- name: Include resource variables
include_vars: "{{ members }}"
# Note(d1): We create the accounts before the role since we do not make
# molecule test this part of the role under test because we do not setup
# the password store. So, instead, we ensure the other parts are working.
- name: Prepare user accounts for the new role
user:
name: "{{ item.username }}"
shell: /bin/bash
password: "$apr1$GILkREir$r2zDF8rr9Bl8We9UVXnZl1"
groups: "{{ user_groups }}"
append: true
update_password: always
with_items: "{{ members }}"
roles:
- role: autonomic.add-users

View File

@ -0,0 +1,6 @@
---
members:
- username: foobar
email: barfoo
ssh_key: "ssh-rsa foo bar@nowhere.com"
uid: 1100

View File

@ -0,0 +1,19 @@
---
dependency:
name: galaxy
driver:
name: hetznercloud
platforms:
- name: "autonomic.add-users-${INSTANCE_UUID}"
server_type: cx11
image: debian-10
provisioner:
name: ansible
lint: |
set -e
yamllint -c .yamllint.yml .
ansible-lint --exclude .drone.yml -c .ansible-lint.yml .

4
requirements.txt Normal file
View File

@ -0,0 +1,4 @@
ansible-lint==6.0.0
ansible==5.4.0
molecule-hetznercloud==1.3.0
molecule==3.6.1

1
tasks/main.yml Normal file
View File

@ -0,0 +1 @@
---