Compare commits
No commits in common. "ce28c8d8504df6ead73ed1a1df66436c44bd4a26" and "7f7ae9b91dd2ab01f14578649d3ebd7f44783172" have entirely different histories.
ce28c8d850
...
7f7ae9b91d
4 changed files with 39 additions and 27 deletions
|
@ -1,5 +1,5 @@
|
||||||
[defaults]
|
[defaults]
|
||||||
roles_path=~/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles:roles
|
roles_path=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,28 +1,44 @@
|
||||||
- name: Wait for cloud-init to finish
|
---
|
||||||
hosts: all
|
- hosts: all
|
||||||
gather_facts: no
|
gather_facts: no
|
||||||
roles:
|
|
||||||
- 'cloudinit-wait'
|
|
||||||
|
|
||||||
- name: Install services
|
|
||||||
hosts: all
|
|
||||||
pre_tasks:
|
pre_tasks:
|
||||||
- name: Copy resolv.conf
|
- name: Wait for host to come up
|
||||||
copy:
|
tags: always
|
||||||
src: resolv.conf
|
block:
|
||||||
dest: /etc/resolv.conf
|
- name: Wait for SSH connection
|
||||||
- name: Update repositories
|
wait_for:
|
||||||
apt:
|
state: started
|
||||||
autoremove: true
|
port: 22
|
||||||
upgrade: yes
|
host: "192.168.30.7"
|
||||||
state: latest
|
timeout: 300
|
||||||
update_cache: yes
|
connect_timeout: 300
|
||||||
cache_valid_time: 86400 # One day
|
search_regex: OpenSSH
|
||||||
- name: Install packages
|
delegate_to: localhost
|
||||||
apt:
|
- name: Wait for cloud-init to finish
|
||||||
pkg:
|
command:
|
||||||
- qemu-guest-agent
|
cmd: cloud-init status --wait
|
||||||
- dnsutils
|
register: cloudinit
|
||||||
|
changed_when: "'..' in cloudinit.stdout"
|
||||||
|
- name: Gather facts
|
||||||
|
setup:
|
||||||
|
- name: Copy resolv.conf
|
||||||
|
copy:
|
||||||
|
src: resolv.conf
|
||||||
|
dest: /etc/resolv.conf
|
||||||
|
- name: Update repositories
|
||||||
|
apt:
|
||||||
|
autoremove: true
|
||||||
|
upgrade: yes
|
||||||
|
state: latest
|
||||||
|
update_cache: yes
|
||||||
|
cache_valid_time: 86400 # One day
|
||||||
|
- name: Install packages
|
||||||
|
apt:
|
||||||
|
pkg:
|
||||||
|
- qemu-guest-agent
|
||||||
|
- dnsutils
|
||||||
|
|
||||||
roles:
|
roles:
|
||||||
- {role: 'dnsmasq', tags: 'dnsmasq'}
|
- {role: 'dnsmasq', tags: 'dnsmasq'}
|
||||||
- {role: 'nsd', tags: 'nsd'}
|
- {role: 'nsd', tags: 'nsd'}
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
- name: cloudinit-wait
|
|
||||||
src: https://git.pim.kunis.nl/pim/ansible-role-cloudinit-wait
|
|
||||||
scm: git
|
|
|
@ -21,7 +21,6 @@ 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