You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible-common/molecule/molecule-vagrant-template.yml

68 lines
1.8 KiB
YAML

---
role_name_check: 1
dependency:
name: galaxy
options:
role-file: requirements.yml
driver:
name: vagrant
provider:
name: libvirt
platforms:
- name: example
box: generic/rhel7
memory: 1024
cpus: 1
# `interfaces`, `provider_options`, and `instance_raw_config_args` must be
# commented out if using a local libvirt hypervisor.
interfaces:
- network_name: public_network
ip: "${VM_IP:-192.168.1.103}"
dev: br0
provider_options:
qemu_use_session: false
uri: "${LIBVIRT_DEFAULT_URI:-qemu:///system}"
connect_via_ssh: true
# TODO this might have only been necessary when we were STIGing the machine,
instance_raw_config_args:
- "vm.provision :shell, inline: \
\"sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' \
/etc/ssh/sshd_config && systemctl restart sshd.service\""
provisioner:
name: ansible
playbooks:
converge: ../shared/converge.yml
verify: ../shared/verify.yml
prepare: ../shared/prepare.yml
# ansible_args:
# - --extra-vars
# - domain=test
options:
diff: true
config_options:
defaults:
stdout_callback: yaml
# This can give us some timing info on a task.
# callbacks_enabled: profile_tasks
# Defining ths iventory is only needed because to pull vars from here
inventory:
hosts:
all:
hosts: # TODO The we're defining these hosts does not scale. Only one
# scenario can be run per host. Maybe we can find a way to grab
# the PID and attach it to the name?
example:
# `ansible_host` must be commented out when using a local
# libvirt hypervisor.
ansible_host: "${VM_IP:-192.168.1.103}"
vars:
artif_url: "${ARTIF_URL}"
verifier:
name: ansible