Compare commits

..

No commits in common. "e5755dd3d0ce60bd49d03971df088538bd956d35" and "3917bfd36424f7b4033c92e859703780d6ac496f" have entirely different histories.

7 changed files with 31 additions and 46 deletions

View File

@ -0,0 +1,2 @@
---
nova_git_install_branch: master

View File

@ -1,5 +1,6 @@
--- ---
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_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 --releasever=8"
lxc_container_map: lxc_container_map:

View File

@ -3,6 +3,5 @@
hosts: "{{ host | default('aio1') }}" hosts: "{{ host | default('aio1') }}"
become: true become: true
- import_playbook: setup-distributed.yml tasks:
vars: - import_playbook: setup-distributed.yml aio_install=1
aio_install: 1

View File

@ -26,21 +26,28 @@
tasks: tasks:
- name: Initialize nodes - name: Initialize nodes
import_tasks: tasks/init-nodes.yml include_tasks: tasks/init-nodes.yml
- name: Reboot - name: Reboot
import_tasks: tasks/reboot.yml include_tasks: tasks/reboot.yml
when: reboot | default(true) | bool
- name: Setup infra hosts - name: Setup infra hosts
import_tasks: tasks/infra-host.yml include_tasks: tasks/infra-host.yml
when: tag.find("infra") != -1 or aio_install | default(false) | bool # when on an infra tagged host when: tag.find("infra") != -1 # when on an infra tagged host
- name: Setup storage hosts - name: Setup storage hosts
import_tasks: tasks/storage-host.yml include_tasks: tasks/storage-host.yml
when: tag.find("storage") != -1 # when on an storage tagged host when: tag.find("storage") != -1 # when on an infra 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

View File

@ -33,22 +33,12 @@
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') | bool when: aio_install | default('false')
block: block:
- name: Debug - Running AIO bootstrap - name: Debug - Running AIO bootstrap
debug: debug:
@ -61,7 +51,7 @@
chdir: /opt/openstack-ansible/ chdir: /opt/openstack-ansible/
creates: /etc/openstack_deploy/ creates: /etc/openstack_deploy/
environment: environment:
SCENARIO: "{{ SCENARIO | default('aio_metal') }}" SCENARIO: "{{ SCENARIO | default('') }}"
tags: tags:
- bootstrap - bootstrap
- aio - aio
@ -104,9 +94,8 @@
- name: patch the thing - name: patch the thing
args: args:
chdir: /etc/ansible/roles/os_nova/ chdir: /etc/ansible/roles/os_nova/
creates: /etc/ansible/roles/os_nova/.patched ansible.builtin.shell: patch -p1 < /tmp/os_nova.patch
ansible.builtin.shell: 'patch -p1 < /tmp/os_nova.patch && touch .patched' when: do_patch | default(true) | bool
- name: Disable SSH Agent Forwarding - name: Disable SSH Agent Forwarding
lineinfile: lineinfile:

View File

@ -81,6 +81,7 @@
name: name:
- git-core - git-core
- wget - wget
#- python36
- chrony - chrony
- openssh-server - openssh-server
#- python3-devel #- python3-devel
@ -98,7 +99,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/8 && git checkout FETCH_HEAD' ansible.builtin.shell: 'git fetch https://review.opendev.org/openstack/openstack-ansible refs/changes/73/823573/6 && git checkout FETCH_HEAD'
args: args:
chdir: /opt/openstack-ansible/ chdir: /opt/openstack-ansible/
@ -120,9 +121,11 @@
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:
@ -140,19 +143,9 @@
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 | default(false) when: tag.find("infra") == -1 and sshkey_fetch
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

View File

@ -16,15 +16,9 @@
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