diff --git a/ocne2/create_instance.yml b/ocne2/create_instance.yml index 9fca8cf..1f267fd 100644 --- a/ocne2/create_instance.yml +++ b/ocne2/create_instance.yml @@ -316,6 +316,10 @@ install_type: "{{ ocne_type if ocne_type is defined else (lookup('file', 'default_vars.yml') | from_yaml).ocne_type | default('none') }}" ansible.builtin.import_playbook: "deploy_ocne_{{ install_type }}.yml" +- name: Provision Podman and Container Tools + ansible.builtin.import_playbook: provision_podman.yml + when: use_podman + - name: Print instances hosts: all become: true diff --git a/ocne2/default_vars.yml b/ocne2/default_vars.yml index 4028748..c5e99b6 100644 --- a/ocne2/default_vars.yml +++ b/ocne2/default_vars.yml @@ -30,4 +30,5 @@ num_cp_nodes: 3 num_wk_nodes: 3 update_all: false #oci_yum_region: ".uk-london-1" -use_fss: false \ No newline at end of file +use_fss: false +use_podman: false \ No newline at end of file diff --git a/ocne2/provision_podman.yml b/ocne2/provision_podman.yml new file mode 100644 index 0000000..66cf3cf --- /dev/null +++ b/ocne2/provision_podman.yml @@ -0,0 +1,36 @@ +--- +# Copyright (c) 2024 Oracle and/or its affiliates. +# This software is made available to you under the terms of the Universal Permissive License (UPL), Version 1.0. +# The Universal Permissive License (UPL), Version 1.0 (see COPYING or https://oss.oracle.com/licenses/upl) +# See LICENSE.TXT for details. + +- name: Install Podman and Container Tools + hosts: server + vars_files: + - default_vars.yml + become: true + + tasks: + + - name: Install Oracle Linux 8 container tools packages + ansible.builtin.dnf: + name: + - "@container-tools:ol8" + - conntrack + - curl + state: present + when: ansible_distribution == 'OracleLinux' and ansible_distribution_major_version == '8' + retries: 5 + delay: 10 + + - name: Install Oracle Linux 9 container tools packages + ansible.builtin.dnf: + name: + - podman + - podman-docker + - conntrack + - curl + state: present + when: ansible_distribution == 'OracleLinux' and ansible_distribution_major_version == '9' + retries: 5 + delay: 10