Compare commits
2 commits
7f7ae9b91d
...
ce28c8d850
Author | SHA1 | Date | |
---|---|---|---|
ce28c8d850 | |||
8917e3e791 |
4 changed files with 27 additions and 39 deletions
|
@ -1,5 +1,5 @@
|
||||||
[defaults]
|
[defaults]
|
||||||
roles_path=roles
|
roles_path=~/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles:roles
|
||||||
inventory=inventory
|
inventory=inventory
|
||||||
vault_password_file=util/secret-service-client.sh
|
vault_password_file=util/secret-service-client.sh
|
||||||
interpreter_python=/usr/bin/python3
|
interpreter_python=/usr/bin/python3
|
||||||
|
|
|
@ -1,27 +1,12 @@
|
||||||
---
|
|
||||||
- hosts: all
|
|
||||||
gather_facts: no
|
|
||||||
|
|
||||||
pre_tasks:
|
|
||||||
- name: Wait for host to come up
|
|
||||||
tags: always
|
|
||||||
block:
|
|
||||||
- name: Wait for SSH connection
|
|
||||||
wait_for:
|
|
||||||
state: started
|
|
||||||
port: 22
|
|
||||||
host: "192.168.30.7"
|
|
||||||
timeout: 300
|
|
||||||
connect_timeout: 300
|
|
||||||
search_regex: OpenSSH
|
|
||||||
delegate_to: localhost
|
|
||||||
- name: Wait for cloud-init to finish
|
- name: Wait for cloud-init to finish
|
||||||
command:
|
hosts: all
|
||||||
cmd: cloud-init status --wait
|
gather_facts: no
|
||||||
register: cloudinit
|
roles:
|
||||||
changed_when: "'..' in cloudinit.stdout"
|
- 'cloudinit-wait'
|
||||||
- name: Gather facts
|
|
||||||
setup:
|
- name: Install services
|
||||||
|
hosts: all
|
||||||
|
pre_tasks:
|
||||||
- name: Copy resolv.conf
|
- name: Copy resolv.conf
|
||||||
copy:
|
copy:
|
||||||
src: resolv.conf
|
src: resolv.conf
|
||||||
|
@ -38,7 +23,6 @@
|
||||||
pkg:
|
pkg:
|
||||||
- qemu-guest-agent
|
- qemu-guest-agent
|
||||||
- dnsutils
|
- dnsutils
|
||||||
|
|
||||||
roles:
|
roles:
|
||||||
- {role: 'dnsmasq', tags: 'dnsmasq'}
|
- {role: 'dnsmasq', tags: 'dnsmasq'}
|
||||||
- {role: 'nsd', tags: 'nsd'}
|
- {role: 'nsd', tags: 'nsd'}
|
||||||
|
|
3
ansible/requirements.yml
Normal file
3
ansible/requirements.yml
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
- name: cloudinit-wait
|
||||||
|
src: https://git.pim.kunis.nl/pim/ansible-role-cloudinit-wait
|
||||||
|
scm: git
|
|
@ -21,6 +21,7 @@ provider "libvirt" {
|
||||||
module "vm" {
|
module "vm" {
|
||||||
source = "git::https://git.pim.kunis.nl/home/tf-modules.git//debian"
|
source = "git::https://git.pim.kunis.nl/home/tf-modules.git//debian"
|
||||||
name = "hermes"
|
name = "hermes"
|
||||||
|
domain_name = "tf-hermes"
|
||||||
use_host_cert = false
|
use_host_cert = false
|
||||||
fixed_address = "192.168.30.7/24"
|
fixed_address = "192.168.30.7/24"
|
||||||
mac = "CA:FE:C0:FF:EE:07"
|
mac = "CA:FE:C0:FF:EE:07"
|
||||||
|
|
Reference in a new issue