49 lines
935 B
YAML
49 lines
935 B
YAML
---
|
|
|
|
- name: Set hostname to logger
|
|
hostname:
|
|
name: logger
|
|
become: yes
|
|
|
|
- name: Create a directory if it does not exist
|
|
file:
|
|
path: /vagrant
|
|
state: directory
|
|
mode: '0755'
|
|
become: yes
|
|
|
|
- name: Copy vagrant resources
|
|
synchronize:
|
|
src: ../../Vagrant/resources
|
|
dest: /vagrant/
|
|
become: yes
|
|
|
|
- name: Copy bootstrap file
|
|
copy:
|
|
src: ../../Vagrant/bootstrap.sh
|
|
dest: /home/vagrant
|
|
owner: vagrant
|
|
group: vagrant
|
|
mode: u+x,g+x
|
|
|
|
- name: Copy netplan file
|
|
copy:
|
|
src: ../resources/01-netcfg.yaml
|
|
dest: /tmp
|
|
owner: vagrant
|
|
group: vagrant
|
|
|
|
- name: Copy the netplan file over as root
|
|
shell: "mv /tmp/01-netcfg.yaml /etc/netplan/01-netcfg.yaml"
|
|
become: yes
|
|
|
|
- name: Apply the new netplan
|
|
shell: netplan apply
|
|
become: yes
|
|
|
|
- name: Run bootstrap.sh
|
|
shell: /home/vagrant/bootstrap.sh | tee -a /home/vagrant/bootstrap.log
|
|
args:
|
|
executable: /bin/bash
|
|
become: yes
|