--- # Automate Oracle Cloud Compute configration - hosts: oracle remote_user: ubuntu name: Install packages, updates, and swap become: true tasks: - name: Edit partition table on sdc tags: swap community.general.parted: device: /dev/sda number: 1 state: present - name: Format partition to swap tags: swap community.general.filesystem: fstype: swap dev: /dev/sda1 - name: Mount swap devices tags: swap ansible.builtin.command: "swapon /dev/sda1" args: creates: /tmp/swap_active - name: Update all packages ansible.builtin.apt: update_cache: 'yes' upgrade: dist - name: Install apt packages ansible.builtin.apt: pkg: - docker.io - mkcert - unzip - pip - name: Reboot the instance tags: swap ansible.builtin.reboot: reboot_timeout: 120