This commit is contained in:
29
molecule/default/converge.yml
Normal file
29
molecule/default/converge.yml
Normal file
@ -0,0 +1,29 @@
|
||||
---
|
||||
- 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(decentral1se): 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
|
||||
6
molecule/default/files/members.yml
Normal file
6
molecule/default/files/members.yml
Normal file
@ -0,0 +1,6 @@
|
||||
---
|
||||
members:
|
||||
- username: foobar
|
||||
email: barfoo
|
||||
ssh_key: "ssh-rsa foo bar@nowhere.com"
|
||||
uid: 1100
|
||||
19
molecule/default/molecule.yml
Normal file
19
molecule/default/molecule.yml
Normal 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 .
|
||||
Reference in New Issue
Block a user