diff --git a/ansible/playbooks/files/user_lxc.yml b/ansible/playbooks/files/user_lxc.yml index a27b479..2838753 100644 --- a/ansible/playbooks/files/user_lxc.yml +++ b/ansible/playbooks/files/user_lxc.yml @@ -1,5 +1,5 @@ --- -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: diff --git a/ansible/playbooks/setup-aio.yml b/ansible/playbooks/setup-aio.yml index 8b3a1b9..1b07daf 100644 --- a/ansible/playbooks/setup-aio.yml +++ b/ansible/playbooks/setup-aio.yml @@ -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 diff --git a/ansible/playbooks/setup-distributed.yml b/ansible/playbooks/setup-distributed.yml index 88ee06d..1b1b305 100644 --- a/ansible/playbooks/setup-distributed.yml +++ b/ansible/playbooks/setup-distributed.yml @@ -26,25 +26,19 @@ tasks: - name: Initialize nodes - include_tasks: tasks/init-nodes.yml - args: - apply: - tags: 'init' - tags: init + import_tasks: tasks/init-nodes.yml - name: Reboot - include_tasks: tasks/reboot.yml - tags: reboot + 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 - tags: infra + 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 - tags: storage + import_tasks: tasks/storage-host.yml + when: tag.find("storage") != -1 # when on an storage tagged host post_tasks: - name: Touching run file that ansible has ran here diff --git a/ansible/playbooks/tasks/infra-host.yml b/ansible/playbooks/tasks/infra-host.yml index f0c118d..4779fa5 100644 --- a/ansible/playbooks/tasks/infra-host.yml +++ b/ansible/playbooks/tasks/infra-host.yml @@ -33,12 +33,21 @@ 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: + file: + path: /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: diff --git a/ansible/playbooks/tasks/init-nodes.yml b/ansible/playbooks/tasks/init-nodes.yml index 303b5c3..4694d25 100644 --- a/ansible/playbooks/tasks/init-nodes.yml +++ b/ansible/playbooks/tasks/init-nodes.yml @@ -81,7 +81,6 @@ name: - git-core - wget - #- python36 - chrony - openssh-server #- python3-devel