Compare commits
No commits in common. "e5755dd3d0ce60bd49d03971df088538bd956d35" and "3917bfd36424f7b4033c92e859703780d6ac496f" have entirely different histories.
e5755dd3d0
...
3917bfd364
2
ansible/playbooks/files/user_debug.yml
Normal file
2
ansible/playbooks/files/user_debug.yml
Normal file
@ -0,0 +1,2 @@
|
||||
---
|
||||
nova_git_install_branch: master
|
@ -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:
|
||||
|
@ -3,6 +3,5 @@
|
||||
hosts: "{{ host | default('aio1') }}"
|
||||
become: true
|
||||
|
||||
- import_playbook: setup-distributed.yml
|
||||
vars:
|
||||
aio_install: 1
|
||||
tasks:
|
||||
- import_playbook: setup-distributed.yml aio_install=1
|
||||
|
@ -26,21 +26,28 @@
|
||||
|
||||
tasks:
|
||||
- name: Initialize nodes
|
||||
import_tasks: tasks/init-nodes.yml
|
||||
include_tasks: tasks/init-nodes.yml
|
||||
|
||||
- name: Reboot
|
||||
import_tasks: tasks/reboot.yml
|
||||
when: reboot | default(true) | bool
|
||||
include_tasks: tasks/reboot.yml
|
||||
|
||||
- name: Setup infra hosts
|
||||
import_tasks: tasks/infra-host.yml
|
||||
when: tag.find("infra") != -1 or aio_install | default(false) | bool # when on an infra tagged host
|
||||
include_tasks: tasks/infra-host.yml
|
||||
when: tag.find("infra") != -1 # when on an infra tagged host
|
||||
|
||||
- name: Setup storage hosts
|
||||
import_tasks: tasks/storage-host.yml
|
||||
when: tag.find("storage") != -1 # when on an storage tagged host
|
||||
include_tasks: tasks/storage-host.yml
|
||||
when: tag.find("storage") != -1 # when on an infra 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
|
||||
|
@ -33,22 +33,12 @@
|
||||
tags: secrets
|
||||
args:
|
||||
creates: /etc/openstack_deploy/user_secrets.yml.tar
|
||||
when: aio_install is undefined | default(false)
|
||||
|
||||
- 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
|
||||
#- import_tasks: tasks/python3-lxc.yml
|
||||
# tags: python3-lxc
|
||||
|
||||
- name: "[AIO] Deploy and setup configuration / bootstrap"
|
||||
when: aio_install | default('false') | bool
|
||||
when: aio_install | default('false')
|
||||
block:
|
||||
- name: Debug - Running AIO bootstrap
|
||||
debug:
|
||||
@ -61,7 +51,7 @@
|
||||
chdir: /opt/openstack-ansible/
|
||||
creates: /etc/openstack_deploy/
|
||||
environment:
|
||||
SCENARIO: "{{ SCENARIO | default('aio_metal') }}"
|
||||
SCENARIO: "{{ SCENARIO | default('') }}"
|
||||
tags:
|
||||
- bootstrap
|
||||
- aio
|
||||
@ -104,9 +94,8 @@
|
||||
- name: patch the thing
|
||||
args:
|
||||
chdir: /etc/ansible/roles/os_nova/
|
||||
creates: /etc/ansible/roles/os_nova/.patched
|
||||
ansible.builtin.shell: 'patch -p1 < /tmp/os_nova.patch && touch .patched'
|
||||
|
||||
ansible.builtin.shell: patch -p1 < /tmp/os_nova.patch
|
||||
when: do_patch | default(true) | bool
|
||||
|
||||
- name: Disable SSH Agent Forwarding
|
||||
lineinfile:
|
||||
|
@ -81,6 +81,7 @@
|
||||
name:
|
||||
- git-core
|
||||
- wget
|
||||
#- python36
|
||||
- chrony
|
||||
- openssh-server
|
||||
#- python3-devel
|
||||
@ -98,7 +99,7 @@
|
||||
tags: repos
|
||||
|
||||
- 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:
|
||||
chdir: /opt/openstack-ansible/
|
||||
|
||||
@ -120,9 +121,11 @@
|
||||
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:
|
||||
@ -140,19 +143,9 @@
|
||||
user: root
|
||||
state: present
|
||||
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
|
||||
|
||||
#- 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
|
||||
|
@ -16,15 +16,9 @@
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user