70 lines
2.2 KiB
YAML
70 lines
2.2 KiB
YAML
---
|
|
- name: Adding Debian 9 OpenNebula GPG key
|
|
apt_key: url='https://downloads.opennebula.org/repo/repo.key' state=present
|
|
when: ansible_os_family == "Debian"
|
|
|
|
# Note, using http instead of https so apt-cacher-ng may cache the repo
|
|
- name: Adding Debian 9 OpenNebula repository
|
|
apt_repository: repo='deb http://downloads.opennebula.org/repo/5.10/Debian/9 stable opennebula' state=present
|
|
when: ansible_os_family == "Debian" and ansible_distribution_major_version == "9"
|
|
|
|
- name: Adding Debian 10 OpenNebula repository
|
|
apt_repository: repo='deb http://downloads.opennebula.org/repo/5.10/Debian/10 stable opennebula' state=present
|
|
when: ansible_os_family == "Debian" and ansible_distribution_major_version == "10"
|
|
|
|
# Install OpenNebula
|
|
- name: Installing OpenNebula controller applications
|
|
apt:
|
|
update_cache: yes
|
|
state: present
|
|
name:
|
|
- opennebula
|
|
- opennebula-sunstone
|
|
- opennebula-gate
|
|
- opennebula-flow
|
|
|
|
# NO longer required for 5.10
|
|
# Install OpenNebula ruby gem dependencies (ONE TIME)
|
|
#- name: Installing OpenNebula ruby gem dependencies
|
|
# command: '/usr/share/one/install_gems --yes'
|
|
# run_once: true
|
|
|
|
# NOTE: OpenNebula daemons do NOT start after install, contrary to how most other debian packages behave.
|
|
# This is good as we want to set passwords and other configurations before we start OpenNebula for the first time.
|
|
|
|
# Set permissions on /var/lib/one folder
|
|
- name: Ensuring permissions on /var/lib/one directory
|
|
file:
|
|
path: /var/lib/one
|
|
state: directory
|
|
owner: oneadmin
|
|
group: oneadmin
|
|
mode: '0755'
|
|
|
|
# Create /var/lib/one/.ssh folder
|
|
- name: Creating /var/lib/one/.ssh directory
|
|
file:
|
|
path: /var/lib/one/.ssh
|
|
state: directory
|
|
owner: oneadmin
|
|
group: oneadmin
|
|
mode: '0755'
|
|
|
|
# Create /var/log/one folder or the daemon will not start
|
|
- name: Creating /var/log/one directory
|
|
file:
|
|
path: /var/log/one
|
|
state: directory
|
|
owner: oneadmin
|
|
group: oneadmin
|
|
mode: '0755'
|
|
|
|
# Copy ssh client config for oneadmin user
|
|
- name: Copying oneadmin SSH client config
|
|
copy:
|
|
src: 'files/ssh.config'
|
|
dest: '/var/lib/one/.ssh/config'
|
|
owner: 'oneadmin'
|
|
group: 'oneadmin'
|
|
mode: '0644'
|