Compare commits

..

7 Commits

Author SHA1 Message Date
Neil Hanlon
e5755dd3d0
AIOs should be metal, for now
* lxc: touch a file that it expects
2022-02-13 18:29:06 -05:00
Neil Hanlon
e6f311f6ec
no longer need to change nova head 2022-02-13 18:28:46 -05:00
Neil Hanlon
84c0b449b5
Fix the roles to actually work; touch a file for lxc to run 2022-02-12 20:31:50 -05:00
Neil Hanlon
a21471be9b
fixes to make it run 2022-02-12 17:44:25 -05:00
Neil Hanlon
e5ba379366
get python3 working again 2022-02-12 17:05:49 -05:00
Neil Hanlon
42ee7d8e9d
fix sshkey_fetch var default 2022-02-12 17:02:14 -05:00
Neil Hanlon
2e86c1ed28 need to build the hosts file, too 2022-02-12 16:55:51 -05:00
7 changed files with 46 additions and 31 deletions

View File

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

View File

@ -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 --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 systemd --releasever=8"
lxc_container_map:

View File

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

View File

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

View File

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

View File

@ -81,7 +81,6 @@
name:
- git-core
- wget
#- python36
- chrony
- openssh-server
#- python3-devel
@ -99,7 +98,7 @@
tags: repos
- 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:
chdir: /opt/openstack-ansible/
@ -121,11 +120,9 @@
flat: yes
when: sshkey_register.ssh_public_key != ""
register: sshkey_fetch
when: tag.find("infra") != -1 or aio_install | default(false)
tags: infra
- name: Install packages on non-infra hosts
when: tag.find("infra") != -1 or aio_install | default(false)
ansible.builtin.dnf:
@ -143,9 +140,19 @@
user: root
state: present
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
#- 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
file:
path: /etc/cloud/cloud-init.disabled

View File

@ -16,9 +16,15 @@
with_items:
- 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
ansible.builtin.dnf:
name: "{{ item }}"
disable_gpg_check: yes # @TODO NO
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-devel-4.0.10-2.el8.x86_64.rpm