blob: f46254cabb139ea6b66bd1e627799e0127c27b55 [file] [log] [blame]
- name: VirtualBox Power Support
become: yes
apt: name={{ item }} state=present
with_items:
- amtterm=1.3*
- wsmancli=2.3.*
- name: VirtualBox Power Script
become: yes
copy:
src: files/amt.template
dest: /etc/maas/templates/power/amt.template
owner: maas
group: maas
mode: "0755"
- name: Ensure SSH Discovery Directory
become: yes
file:
path: /etc/maas/virtualbox
state: directory
owner: maas
group: maas
mode: "0755"
- name: VirtualBox Power Discovery Support
become: yes
copy:
src: /etc/maas/.ssh/cord_rsa
dest: /etc/maas/virtualbox/id_rsa
owner: root
group: root
mode: "0600"
- name: VirtualBox Power Discovery Script
become: yes
copy:
src: files/power_discovery
dest: /etc/maas/virtualbox/power_discovery
owner: maas
group: maas
mode: "0755"
- name: Ensure SSH Power Script Directory
become: yes
file:
path: /var/lib/maas/.ssh
state: directory
owner: maas
group: maas
mode: "0700"
- name: VirtualBox Power Script Key Pair Support
become: yes
copy:
src: /etc/maas/.ssh/{{ item.src }}
dest: /var/lib/maas/.ssh/{{ item.dest }}
owner: maas
group: maas
mode: "0600"
with_items:
- { src: cord_rsa, dest: id_rsa }
- { src: cord_rsa.pub, dest: id_rsa.pub }
- name: VirtualBox Power Script SSH Config Support
become: yes
copy:
src: "files/{{ item.src }}"
dest: /var/lib/maas/.ssh/{{ item.dest }}
owner: maas
group: maas
mode: "0600"
with_items:
- { src: ssh_config, dest: config }
- name: Discover VirtualBox Host
become: yes
shell: netstat -rn | grep "^0.0.0.0 " | cut -d " " -f10
register: discovered_vbox_host
changed_when: false