Fred Damstra [io2] 19c7bf69be Install packages and handle reboots 4 năm trước cách đây
..
filter_plugins 99a930d811 Ansible Directory Structure Added 4 năm trước cách đây
group_vars 55212fdcca Next up: Don't run command if it's been run 4 năm trước cách đây
host_vars 99a930d811 Ansible Directory Structure Added 4 năm trước cách đây
library 99a930d811 Ansible Directory Structure Added 4 năm trước cách đây
logs 29c9dce05e Initial inventory 4 năm trước cách đây
module_utils 99a930d811 Ansible Directory Structure Added 4 năm trước cách đây
roles 19c7bf69be Install packages and handle reboots 4 năm trước cách đây
tasks 19c7bf69be Install packages and handle reboots 4 năm trước cách đây
.git_save 99a930d811 Ansible Directory Structure Added 4 năm trước cách đây
README.md 4be4b4a407 Installs public/private key 4 năm trước cách đây
ansible.cfg 55212fdcca Next up: Don't run command if it's been run 4 năm trước cách đây
inventory.ini 5f4f1d879c Initial playbooks operational 4 năm trước cách đây
io.yml 5f4f1d879c Initial playbooks operational 4 năm trước cách đây
k8s.yml 5f4f1d879c Initial playbooks operational 4 năm trước cách đây
site.yml 78f39b1455 Initial user setup 4 năm trước cách đây
test.yml 19c7bf69be Install packages and handle reboots 4 năm trước cách đây

README.md

Basically part and parcel from https://docs.ansible.com/ansible/latest/user_guide/sample_setup.html

production                # inventory file for production servers
staging                   # inventory file for staging environment

group_vars/
   group1.yml             # here we assign variables to particular groups
   group2.yml
host_vars/
   hostname1.yml          # here we assign variables to particular systems
   hostname2.yml

library/                  # if any custom modules, put them here (optional)
module_utils/             # if any custom module_utils to support modules, put them here (optional)
filter_plugins/           # if any custom filter plugins, put them here (optional)

site.yml                  # master playbook
webservers.yml            # playbook for webserver tier
dbservers.yml             # playbook for dbserver tier
tasks/                    # task files included from playbooks
    webservers-extra.yml  # <-- avoids confusing playbook with task files

roles/
    common/               # this hierarchy represents a "role"
        tasks/            #
            main.yml      #  <-- tasks file can include smaller files if warranted
        handlers/         #
            main.yml      #  <-- handlers file
        templates/        #  <-- files for use with the template resource
            ntp.conf.j2   #  <------- templates end in .j2
        files/            #
            bar.txt       #  <-- files for use with the copy resource
            foo.sh        #  <-- script files for use with the script resource
        vars/             #
            main.yml      #  <-- variables associated with this role
        defaults/         #
            main.yml      #  <-- default lower priority variables for this role
        meta/             #
            main.yml      #  <-- role dependencies
        library/          # roles can also include custom modules
        module_utils/     # roles can also include custom module_utils
        lookup_plugins/   # or other types of plugins, like lookup in this case

    webtier/              # same kind of structure as "common" was above, done for the webtier role
    monitoring/           # ""
    fooapp/               # ""

Bootstrapping

  1. Check out this repository
  2. Create a file ~/.ansible_vault with the vault password
  3. Use raspberry pi imager to install Ubuntu LTS (20.04 at time of this writing) 64-bit.
  4. Find IP (via DHCP lease?).
  5. Login with username ubuntu, password ubuntu. Set a new password.
  6. Add hostname to inventory.
  7. Run ssh-copy-id ubuntu@hostname and enter your password.
  8. Run the initial_user.yml task:

    ansible-playbook -u ubuntu tasks/initial_users.yml --limit=k8s3
    

Setting up a node/highstating:

Magic [not yet done]:

ansible-playbook k8s.yml