diff --git a/README.md b/README.md index 966f8f6..bfbf56f 100644 --- a/README.md +++ b/README.md @@ -148,12 +148,21 @@ You can also manually install the dependencies if your preferer. ### 3. Provision your local machine and deploy the example stack +1. Copy `ansible/group_vars/localhost_overrides.sample.yml` to `ansible/group_vars/localhost_overrides.yml` +2. Add `ansible_user` variable with your user name + +```raw +ansible_user: +``` + +3. Provision and Deploy + ```bash ./tads ansible-playbook localhost provision ./tads ansible-playbook localhost deploy ``` -The first command will: +The first `./tads` command will: - Install Docker on your local machine - Set up a Swarm cluster with one manager node diff --git a/ansible/provision-00-common.yml b/ansible/provision-00-common.yml index d66eb0c..88b8621 100644 --- a/ansible/provision-00-common.yml +++ b/ansible/provision-00-common.yml @@ -43,4 +43,10 @@ key: "{{ item }}" with_items: "{{ docker_authorized_ssh_keys }}" + - name: Install Pip + become: True + apt: + name: python3-pip + update_cache: true + # ADD YOUR OWN TASKS HERE diff --git a/ansible/provision-01-docker.yml b/ansible/provision-01-docker.yml index f1011e8..33f038f 100644 --- a/ansible/provision-01-docker.yml +++ b/ansible/provision-01-docker.yml @@ -9,6 +9,7 @@ become: True roles: - role: geerlingguy.pip + pip_executable: pip3 vars: pip_install_packages: - name: jsondiff # needed by Ansible docker_stack module diff --git a/ansible/requirements.yml b/ansible/requirements.yml index 654db93..22eca21 100644 --- a/ansible/requirements.yml +++ b/ansible/requirements.yml @@ -5,7 +5,7 @@ ## - src: geerlingguy.pip - version: 1.3.0 + version: 2.1.0 - src: geerlingguy.docker - version: 2.5.2 + version: 3.1.2 diff --git a/scripts/includes/ansible.sh b/scripts/includes/ansible.sh index 354dfc5..1c4ace3 100644 --- a/scripts/includes/ansible.sh +++ b/scripts/includes/ansible.sh @@ -21,7 +21,7 @@ check_ansible () { fi local current_ansible_version - current_ansible_version="$(ansible --version | head -n1 | cut -d " " -f2)" + current_ansible_version="$(ansible --version | head -n1 | cut -d " " -f3 | cut -c1-4)" if ! is_version_gte "${current_ansible_version}" "${TADS_MIN_ANSIBLE_VERSION}"; then echo_red "Your Ansible version (${current_ansible_version}) is not supported by T.A.D.S." diff --git a/vagrant/Vagrantfile b/vagrant/Vagrantfile index be2ab8b..b4af89b 100644 --- a/vagrant/Vagrantfile +++ b/vagrant/Vagrantfile @@ -28,7 +28,7 @@ host_suffix = "vagrant-" Vagrant.configure("2") do |config| # ** Global config for all machines: # Use debian 9 - config.vm.box = "debian/stretch64" + config.vm.box = "debian/bullseye64" # Disable default rsync of current host directory config.vm.synced_folder ".", "/vagrant", disabled: true