Updates to many roles, including main user role to allow setting an alternate home directory
This commit is contained in:
@@ -9,11 +9,20 @@
|
||||
- gnupg2
|
||||
- software-properties-common
|
||||
|
||||
- name: Addding Docker apt repository key
|
||||
- name: Addding Debian Docker apt repository key
|
||||
apt_key: url='https://download.docker.com/linux/debian/gpg' state=present
|
||||
|
||||
- name: Adding Docker apt repository sources
|
||||
- name: Adding Debian 9 Docker apt repository sources
|
||||
apt_repository: repo='deb [arch=amd64] https://download.docker.com/linux/debian stretch stable' state=present
|
||||
when: ansible_os_family == "Debian" and ansible_distribution_major_version == "9"
|
||||
|
||||
- name: Adding Debian 10 Docker apt repository sources
|
||||
apt_repository: repo='deb [arch=amd64] https://download.docker.com/linux/debian buster stable' state=present
|
||||
when: ansible_os_family == "Debian" and ansible_distribution_major_version == "10"
|
||||
|
||||
- name: Adding Debian 11 Docker apt repository sources
|
||||
apt_repository: repo='deb [arch=amd64] https://download.docker.com/linux/debian bullseye stable' state=present
|
||||
when: ansible_os_family == "Debian" and ansible_distribution_major_version == "11"
|
||||
|
||||
- name: Installing Docker
|
||||
apt:
|
||||
@@ -21,4 +30,6 @@
|
||||
state: present
|
||||
name:
|
||||
- docker-ce
|
||||
- docker-ce-cli
|
||||
- containerd.io
|
||||
- docker-compose
|
||||
|
||||
1461
virt/opennebula-6.2-controller/files/originals/oned.conf
Normal file
1461
virt/opennebula-6.2-controller/files/originals/oned.conf
Normal file
File diff suppressed because it is too large
Load Diff
3
virt/opennebula-6.2-controller/files/ssh.config
Normal file
3
virt/opennebula-6.2-controller/files/ssh.config
Normal file
@@ -0,0 +1,3 @@
|
||||
# So ansible does not have to add each hypervisor node to known_hosts
|
||||
StrictHostKeyChecking=no
|
||||
UserKnownHostsFile=/dev/null
|
||||
65
virt/opennebula-6.2-controller/tasks/main.yml
Normal file
65
virt/opennebula-6.2-controller/tasks/main.yml
Normal file
@@ -0,0 +1,65 @@
|
||||
---
|
||||
- name: Adding Debian OpenNebula GPG key
|
||||
apt_key: url='https://downloads.opennebula.io/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 10 OpenNebula repository
|
||||
apt_repository: repo='deb http://downloads.opennebula.io/repo/6.2/Debian/10 stable opennebula' state=present
|
||||
when: ansible_os_family == "Debian" and ansible_distribution_major_version == "10"
|
||||
|
||||
- name: Adding Debian 11 OpenNebula repository
|
||||
apt_repository: repo='deb http://downloads.opennebula.io/repo/6.2/Debian/11 stable opennebula' state=present
|
||||
when: ansible_os_family == "Debian" and ansible_distribution_major_version == "11"
|
||||
|
||||
# Install OpenNebula
|
||||
- name: Installing OpenNebula controller applications
|
||||
apt:
|
||||
update_cache: yes
|
||||
state: present
|
||||
name:
|
||||
- opennebula
|
||||
- opennebula-sunstone
|
||||
- opennebula-fireedge
|
||||
- opennebula-gate
|
||||
- opennebula-flow
|
||||
- opennebula-provision
|
||||
|
||||
# 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'
|
||||
3
virt/opennebula-6.2-kvm-node/files/ssh.config
Normal file
3
virt/opennebula-6.2-kvm-node/files/ssh.config
Normal file
@@ -0,0 +1,3 @@
|
||||
# So ansible does not have to add each hypervisor node to known_hosts
|
||||
StrictHostKeyChecking=no
|
||||
UserKnownHostsFile=/dev/null
|
||||
3
virt/opennebula-6.2-kvm-node/handlers/main.yml
Normal file
3
virt/opennebula-6.2-kvm-node/handlers/main.yml
Normal file
@@ -0,0 +1,3 @@
|
||||
---
|
||||
- name: restart libvirtd
|
||||
service: name=libvirtd state=restarted
|
||||
79
virt/opennebula-6.2-kvm-node/tasks/main.yml
Normal file
79
virt/opennebula-6.2-kvm-node/tasks/main.yml
Normal file
@@ -0,0 +1,79 @@
|
||||
---
|
||||
- name: Adding Debian OpenNebula GPG key
|
||||
apt_key: url='https://downloads.opennebula.io/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 10 OpenNebula repository
|
||||
apt_repository: repo='deb http://downloads.opennebula.io/repo/6.2/Debian/10 stable opennebula' state=present
|
||||
when: ansible_os_family == "Debian" and ansible_distribution_major_version == "10"
|
||||
|
||||
- name: Adding Debian 11 OpenNebula repository
|
||||
apt_repository: repo='deb http://downloads.opennebula.io/repo/6.2/Debian/11 stable opennebula' state=present
|
||||
when: ansible_os_family == "Debian" and ansible_distribution_major_version == "11"
|
||||
|
||||
# Install OpenNebula Node
|
||||
- name: Installing OpenNebula controller applications
|
||||
apt:
|
||||
update_cache: yes
|
||||
state: present
|
||||
name: opennebula-node-kvm
|
||||
notify: restart libvirtd
|
||||
|
||||
# Copy /etc/libvirt/libvirt.conf to bypass polkit socket permissions
|
||||
# - name: Copying libvirtd.conf
|
||||
# copy:
|
||||
# src: 'libvirtd-debian10.conf'
|
||||
# dest: '/etc/libvirt/libvirtd.conf'
|
||||
# owner: 'root'
|
||||
# group: 'root'
|
||||
# mode: '0644'
|
||||
# notify: restart libvirtd
|
||||
# when: ansible_os_family == "Debian" and ansible_distribution_major_version == "10"
|
||||
|
||||
# # Copy /etc/libvirt/libvirt.conf to bypass polkit socker permissions
|
||||
# - name: Copying libvirtd.conf
|
||||
# copy:
|
||||
# src: 'libvirtd-debian9.conf'
|
||||
# dest: '/etc/libvirt/libvirtd.conf'
|
||||
# owner: 'root'
|
||||
# group: 'root'
|
||||
# mode: '0644'
|
||||
# notify: restart libvirtd
|
||||
# when: ansible_os_family == "Debian" and ansible_distribution_major_version == "9"
|
||||
|
||||
# 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'
|
||||
Reference in New Issue
Block a user