init dev env with molecule
This commit is contained in:
parent
4b2fc3b11d
commit
d65eb1a6f3
@ -10,3 +10,10 @@ deploy_staging:
|
|||||||
|
|
||||||
generate-token:
|
generate-token:
|
||||||
@echo export VAULT_TOKEN=`vault token create -policy=ansible -field="token" -period 6h`
|
@echo export VAULT_TOKEN=`vault token create -policy=ansible -field="token" -period 6h`
|
||||||
|
|
||||||
|
|
||||||
|
create-dev:
|
||||||
|
molecule converge
|
||||||
|
|
||||||
|
destroy-dev:
|
||||||
|
molecule destroy
|
||||||
|
15
ansible/molecule/default/INSTALL.rst
Normal file
15
ansible/molecule/default/INSTALL.rst
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
***********************************
|
||||||
|
Delegated driver installation guide
|
||||||
|
***********************************
|
||||||
|
|
||||||
|
Requirements
|
||||||
|
============
|
||||||
|
|
||||||
|
This driver is delegated to the developer. Up to the developer to implement
|
||||||
|
requirements.
|
||||||
|
|
||||||
|
Install
|
||||||
|
=======
|
||||||
|
|
||||||
|
This driver is delegated to the developer. Up to the developer to implement
|
||||||
|
requirements.
|
2
ansible/molecule/default/converge.yml
Normal file
2
ansible/molecule/default/converge.yml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
---
|
||||||
|
- import_playbook: ../../site.yml
|
45
ansible/molecule/default/molecule.yml
Normal file
45
ansible/molecule/default/molecule.yml
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
---
|
||||||
|
dependency:
|
||||||
|
name: galaxy
|
||||||
|
driver:
|
||||||
|
name: lxd
|
||||||
|
platforms:
|
||||||
|
- name: oscar-dev
|
||||||
|
image: images:archlinux
|
||||||
|
source:
|
||||||
|
type: image
|
||||||
|
mode: pull
|
||||||
|
alias: archlinux
|
||||||
|
- name: merlin-dev
|
||||||
|
source:
|
||||||
|
type: image
|
||||||
|
mode: pull
|
||||||
|
alias: rockylinux/9
|
||||||
|
- name: gerard-dev
|
||||||
|
source:
|
||||||
|
type: image
|
||||||
|
mode: pull
|
||||||
|
alias: debian/11
|
||||||
|
provisioner:
|
||||||
|
name: ansible
|
||||||
|
connection_options:
|
||||||
|
ansible_ssh_user: user
|
||||||
|
ansible_become: true
|
||||||
|
log: true
|
||||||
|
lint:
|
||||||
|
name: ansible-lint
|
||||||
|
inventory:
|
||||||
|
host_vars:
|
||||||
|
oscar-dev:
|
||||||
|
user:
|
||||||
|
name: user
|
||||||
|
merlin-dev:
|
||||||
|
user:
|
||||||
|
name: user
|
||||||
|
gerard-dev:
|
||||||
|
user:
|
||||||
|
name: user
|
||||||
|
links:
|
||||||
|
hosts: ../../staging
|
||||||
|
verifier:
|
||||||
|
name: ansible
|
9
ansible/molecule/default/prepare.yml
Normal file
9
ansible/molecule/default/prepare.yml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
- hosts: all
|
||||||
|
remote_user: root
|
||||||
|
become: true
|
||||||
|
gather_facts: false
|
||||||
|
tasks:
|
||||||
|
- name: Init pacman
|
||||||
|
ansible.builtin.include_role:
|
||||||
|
name: ansible_bootstrap
|
||||||
|
|
10
ansible/molecule/default/verify.yml
Normal file
10
ansible/molecule/default/verify.yml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
---
|
||||||
|
# This is an example playbook to execute Ansible tests.
|
||||||
|
|
||||||
|
- name: Verify
|
||||||
|
hosts: all
|
||||||
|
gather_facts: false
|
||||||
|
tasks:
|
||||||
|
- name: Example assertion
|
||||||
|
ansible.builtin.assert:
|
||||||
|
that: true
|
@ -1,13 +1,15 @@
|
|||||||
|
[homelab]
|
||||||
|
oscar-dev
|
||||||
|
gerard-dev
|
||||||
|
|
||||||
[VPS]
|
[VPS]
|
||||||
VMDR
|
merlin-dev
|
||||||
|
|
||||||
[dhcp]
|
|
||||||
VMAS-BUILD
|
|
||||||
|
|
||||||
[VMServer]
|
|
||||||
VMAS-HML
|
|
||||||
|
|
||||||
|
|
||||||
[wireguard]
|
[wireguard]
|
||||||
VMDR
|
oscar-dev
|
||||||
|
gerard-dev
|
||||||
|
|
||||||
|
[database]
|
||||||
|
oscar-dev
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user