diff --git a/README.md b/README.md index 1b7dd87..e6df684 100644 --- a/README.md +++ b/README.md @@ -67,6 +67,8 @@ node If multiple hosts are in the master group, the playbook will automatically set up k3s in [HA mode with etcd](https://rancher.com/docs/k3s/latest/en/installation/ha-embedded/). +Finally, copy `ansible.example.cfg` to `ansible.cfg` and adapt the inventory path to match the files that you just created. + This requires at least k3s version `1.19.1` however the version is configurable by using the `k3s_version` variable. If needed, you can also edit `inventory/my-cluster/group_vars/all.yml` to match your environment. diff --git a/ansible.cfg b/ansible.cfg deleted file mode 100644 index 2c764c0..0000000 --- a/ansible.cfg +++ /dev/null @@ -1,23 +0,0 @@ -[defaults] -nocows = True -roles_path = ./roles -inventory = ./hosts.ini -stdout_callback = yaml - -remote_tmp = $HOME/.ansible/tmp -local_tmp = $HOME/.ansible/tmp -timeout = 60 -host_key_checking = False -deprecation_warnings = False -callbacks_enabled = profile_tasks -log_path = ./ansible.log - -[privilege_escalation] -become = True - -[ssh_connection] -scp_if_ssh = smart -retries = 3 -ssh_args = -o ControlMaster=auto -o ControlPersist=30m -o Compression=yes -o ServerAliveInterval=15s -pipelining = True -control_path = %(directory)s/%%h-%%r diff --git a/ansible.example.cfg b/ansible.example.cfg new file mode 100644 index 0000000..b36870b --- /dev/null +++ b/ansible.example.cfg @@ -0,0 +1,2 @@ +[defaults] +inventory = inventory/my-cluster/hosts.ini ; Adapt this to the path to your inventory file diff --git a/deploy.sh b/deploy.sh index 808cdb3..8f702d6 100755 --- a/deploy.sh +++ b/deploy.sh @@ -1,3 +1,3 @@ #!/bin/bash -ansible-playbook site.yml -i inventory/my-cluster/hosts.ini +ansible-playbook site.yml diff --git a/reboot.sh b/reboot.sh index c247cf5..95f66a6 100644 --- a/reboot.sh +++ b/reboot.sh @@ -1,3 +1,3 @@ #!/bin/bash -ansible-playbook reboot.yml -i inventory/my-cluster/hosts.ini +ansible-playbook reboot.yml diff --git a/reset.sh b/reset.sh index 74b8e34..bd9dcae 100755 --- a/reset.sh +++ b/reset.sh @@ -1,3 +1,3 @@ #!/bin/bash -ansible-playbook reset.yml -i inventory/my-cluster/hosts.ini +ansible-playbook reset.yml