Compare commits
7 Commits
3917bfd364
...
e5755dd3d0
Author | SHA1 | Date | |
---|---|---|---|
|
e5755dd3d0 | ||
|
e6f311f6ec | ||
|
84c0b449b5 | ||
|
a21471be9b | ||
|
e5ba379366 | ||
|
42ee7d8e9d | ||
|
2e86c1ed28 |
@ -1,2 +0,0 @@
|
|||||||
---
|
|
||||||
nova_git_install_branch: master
|
|
@ -1,6 +1,5 @@
|
|||||||
---
|
---
|
||||||
lxc_container_base_name: "rocky-8-amd64"
|
lxc_hosts_container_build_command: "dnf --assumeyes --installroot=/var/lib/machines/{{ lxc_container_base_name }} install --setopt=install_weak_deps=False --nodocs rootfiles coreutils dnf rocky-release rocky-repos systemd --releasever=8"
|
||||||
lxc_hosts_container_build_command: "dnf --assumeyes --installroot=/var/lib/machines/{{ lxc_container_base_name }} install --setopt=install_weak_deps=False --nodocs rootfiles coreutils dnf rocky-release rocky-repos --releasever=8"
|
|
||||||
|
|
||||||
|
|
||||||
lxc_container_map:
|
lxc_container_map:
|
||||||
|
@ -3,5 +3,6 @@
|
|||||||
hosts: "{{ host | default('aio1') }}"
|
hosts: "{{ host | default('aio1') }}"
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
tasks:
|
- import_playbook: setup-distributed.yml
|
||||||
- import_playbook: setup-distributed.yml aio_install=1
|
vars:
|
||||||
|
aio_install: 1
|
||||||
|
@ -26,28 +26,21 @@
|
|||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: Initialize nodes
|
- name: Initialize nodes
|
||||||
include_tasks: tasks/init-nodes.yml
|
import_tasks: tasks/init-nodes.yml
|
||||||
|
|
||||||
- name: Reboot
|
- name: Reboot
|
||||||
include_tasks: tasks/reboot.yml
|
import_tasks: tasks/reboot.yml
|
||||||
|
when: reboot | default(true) | bool
|
||||||
|
|
||||||
- name: Setup infra hosts
|
- name: Setup infra hosts
|
||||||
include_tasks: tasks/infra-host.yml
|
import_tasks: tasks/infra-host.yml
|
||||||
when: tag.find("infra") != -1 # when on an infra tagged host
|
when: tag.find("infra") != -1 or aio_install | default(false) | bool # when on an infra tagged host
|
||||||
|
|
||||||
- name: Setup storage hosts
|
- name: Setup storage hosts
|
||||||
include_tasks: tasks/storage-host.yml
|
import_tasks: tasks/storage-host.yml
|
||||||
when: tag.find("storage") != -1 # when on an infra tagged host
|
when: tag.find("storage") != -1 # when on an storage tagged host
|
||||||
|
|
||||||
post_tasks:
|
post_tasks:
|
||||||
- name: Copy key to others
|
|
||||||
ansible.posix.authorized_key:
|
|
||||||
user: root
|
|
||||||
state: present
|
|
||||||
key: "{{ lookup('file', 'files/buffer/infra-id_rsa.pub') }}"
|
|
||||||
when: tag.find("infra") == -1 and sshkey_fetch
|
|
||||||
tags: sshkey
|
|
||||||
|
|
||||||
- name: Touching run file that ansible has ran here
|
- name: Touching run file that ansible has ran here
|
||||||
file:
|
file:
|
||||||
path: /var/log/ansible.run
|
path: /var/log/ansible.run
|
||||||
|
@ -33,12 +33,22 @@
|
|||||||
tags: secrets
|
tags: secrets
|
||||||
args:
|
args:
|
||||||
creates: /etc/openstack_deploy/user_secrets.yml.tar
|
creates: /etc/openstack_deploy/user_secrets.yml.tar
|
||||||
|
when: aio_install is undefined | default(false)
|
||||||
|
|
||||||
#- import_tasks: tasks/python3-lxc.yml
|
- import_tasks: tasks/python3-lxc.yml
|
||||||
# tags: python3-lxc
|
|
||||||
|
- name:
|
||||||
|
copy:
|
||||||
|
content: ""
|
||||||
|
dest: /usr/share/lxc/config/rockylinux.common.conf
|
||||||
|
mode: '0644'
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
|
||||||
|
tags: python3-lxc
|
||||||
|
|
||||||
- name: "[AIO] Deploy and setup configuration / bootstrap"
|
- name: "[AIO] Deploy and setup configuration / bootstrap"
|
||||||
when: aio_install | default('false')
|
when: aio_install | default('false') | bool
|
||||||
block:
|
block:
|
||||||
- name: Debug - Running AIO bootstrap
|
- name: Debug - Running AIO bootstrap
|
||||||
debug:
|
debug:
|
||||||
@ -51,7 +61,7 @@
|
|||||||
chdir: /opt/openstack-ansible/
|
chdir: /opt/openstack-ansible/
|
||||||
creates: /etc/openstack_deploy/
|
creates: /etc/openstack_deploy/
|
||||||
environment:
|
environment:
|
||||||
SCENARIO: "{{ SCENARIO | default('') }}"
|
SCENARIO: "{{ SCENARIO | default('aio_metal') }}"
|
||||||
tags:
|
tags:
|
||||||
- bootstrap
|
- bootstrap
|
||||||
- aio
|
- aio
|
||||||
@ -94,8 +104,9 @@
|
|||||||
- name: patch the thing
|
- name: patch the thing
|
||||||
args:
|
args:
|
||||||
chdir: /etc/ansible/roles/os_nova/
|
chdir: /etc/ansible/roles/os_nova/
|
||||||
ansible.builtin.shell: patch -p1 < /tmp/os_nova.patch
|
creates: /etc/ansible/roles/os_nova/.patched
|
||||||
when: do_patch | default(true) | bool
|
ansible.builtin.shell: 'patch -p1 < /tmp/os_nova.patch && touch .patched'
|
||||||
|
|
||||||
|
|
||||||
- name: Disable SSH Agent Forwarding
|
- name: Disable SSH Agent Forwarding
|
||||||
lineinfile:
|
lineinfile:
|
||||||
|
@ -81,7 +81,6 @@
|
|||||||
name:
|
name:
|
||||||
- git-core
|
- git-core
|
||||||
- wget
|
- wget
|
||||||
#- python36
|
|
||||||
- chrony
|
- chrony
|
||||||
- openssh-server
|
- openssh-server
|
||||||
#- python3-devel
|
#- python3-devel
|
||||||
@ -99,7 +98,7 @@
|
|||||||
tags: repos
|
tags: repos
|
||||||
|
|
||||||
- name: fetch patch
|
- name: fetch patch
|
||||||
ansible.builtin.shell: 'git fetch https://review.opendev.org/openstack/openstack-ansible refs/changes/73/823573/6 && git checkout FETCH_HEAD'
|
ansible.builtin.shell: 'git fetch https://review.opendev.org/openstack/openstack-ansible refs/changes/73/823573/8 && git checkout FETCH_HEAD'
|
||||||
args:
|
args:
|
||||||
chdir: /opt/openstack-ansible/
|
chdir: /opt/openstack-ansible/
|
||||||
|
|
||||||
@ -121,11 +120,9 @@
|
|||||||
flat: yes
|
flat: yes
|
||||||
when: sshkey_register.ssh_public_key != ""
|
when: sshkey_register.ssh_public_key != ""
|
||||||
register: sshkey_fetch
|
register: sshkey_fetch
|
||||||
|
|
||||||
when: tag.find("infra") != -1 or aio_install | default(false)
|
when: tag.find("infra") != -1 or aio_install | default(false)
|
||||||
tags: infra
|
tags: infra
|
||||||
|
|
||||||
|
|
||||||
- name: Install packages on non-infra hosts
|
- name: Install packages on non-infra hosts
|
||||||
when: tag.find("infra") != -1 or aio_install | default(false)
|
when: tag.find("infra") != -1 or aio_install | default(false)
|
||||||
ansible.builtin.dnf:
|
ansible.builtin.dnf:
|
||||||
@ -143,9 +140,19 @@
|
|||||||
user: root
|
user: root
|
||||||
state: present
|
state: present
|
||||||
key: "{{ lookup('file', 'files/buffer/infra-id_rsa.pub') }}"
|
key: "{{ lookup('file', 'files/buffer/infra-id_rsa.pub') }}"
|
||||||
when: tag.find("infra") == -1 and sshkey_fetch
|
when: tag.find("infra") == -1 and sshkey_fetch | default(false)
|
||||||
tags: sshkey
|
tags: sshkey
|
||||||
|
|
||||||
|
#- name: Setup a hosts file for the static deployment
|
||||||
|
# ansible.builtin.lineinfile:
|
||||||
|
# dest: /etc/hosts
|
||||||
|
# line: "{{ hostvars[ansible_fqdn]['ansible_br_mgmt']['ipv4']['address'] }} {{ ansible_hostname }}"
|
||||||
|
# when:
|
||||||
|
# - hostvars[ansible_fqdn]['ansible_br_mgmt'] is defined
|
||||||
|
# - hostvars[ansible_fqdn]['ansible_br_mgmt']['ipv4']['address'] is defined
|
||||||
|
# tags: debug123
|
||||||
|
|
||||||
|
|
||||||
- name: Disable cloud init from future runs
|
- name: Disable cloud init from future runs
|
||||||
file:
|
file:
|
||||||
path: /etc/cloud/cloud-init.disabled
|
path: /etc/cloud/cloud-init.disabled
|
||||||
|
@ -16,9 +16,15 @@
|
|||||||
with_items:
|
with_items:
|
||||||
- python38-lxc-3.0.4-11.el8.x86_64.rpm
|
- python38-lxc-3.0.4-11.el8.x86_64.rpm
|
||||||
|
|
||||||
|
# @TODO - fix this to not be shit
|
||||||
|
- name: Install neil/lxc3.0 copr
|
||||||
|
become: yes
|
||||||
|
shell: "dnf -y copr enable neil/lxc3.0"
|
||||||
|
|
||||||
- name: Install package
|
- name: Install package
|
||||||
ansible.builtin.dnf:
|
ansible.builtin.dnf:
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
|
disable_gpg_check: yes # @TODO NO
|
||||||
with_items:
|
with_items:
|
||||||
- https://download.copr.fedorainfracloud.org/results/neil/lxc3.0/epel-8-x86_64/03253339-lxc/lxc-4.0.10-2.el8.x86_64.rpm
|
- https://download.copr.fedorainfracloud.org/results/neil/lxc3.0/epel-8-x86_64/03253339-lxc/lxc-4.0.10-2.el8.x86_64.rpm
|
||||||
- https://download.copr.fedorainfracloud.org/results/neil/lxc3.0/epel-8-x86_64/03253339-lxc/lxc-devel-4.0.10-2.el8.x86_64.rpm
|
- https://download.copr.fedorainfracloud.org/results/neil/lxc3.0/epel-8-x86_64/03253339-lxc/lxc-devel-4.0.10-2.el8.x86_64.rpm
|
||||||
|
Loading…
x
Reference in New Issue
Block a user