diff --git a/inventory/group_vars/all.yml b/inventory/group_vars/all.yml index b8ba17b87..43136af2c 100644 --- a/inventory/group_vars/all.yml +++ b/inventory/group_vars/all.yml @@ -98,6 +98,7 @@ postgres_encoding: en_US.utf8 # to the defaults if present. Make sure you use the "list" notation with the dashes! postgresql_version: "{% if ansible_distribution_major_version == '16' %}9.5{% elif ansible_distribution_major_version == '18' %}10{% else %}12{% endif %}" +postgresql_version: "{% if ansible_distribution_major_version == '16' %}9.5{% elif ansible_distribution_major_version == '18' %}10{% elif ansible_distribution_major_version == '20' %}12{% else %}14{% endif %}" postgresql_data_dir: "/var/lib/postgresql/{{ postgresql_version }}/main" postgresql_bin_path: "/usr/lib/postgresql/{{ postgresql_version }}/bin" postgresql_config_path: "/etc/postgresql/{{ postgresql_version }}/main" diff --git a/lxc-setup b/lxc-setup new file mode 100644 index 000000000..ffd68f799 --- /dev/null +++ b/lxc-setup @@ -0,0 +1,26 @@ +apt install lxd +lxd init # enter a lot for default settings +usermod -aG lxd maikel + +su - "$USER" # starts a new shell with the new group added + +lxc launch ubuntu:22.04 ofn-dev +lxc exec ofn-dev -- sh -c 'cat >> .ssh/authorized_keys' < ~/.ssh/id_rsa.pub + +lxc list # to get IP address +echo ' +Host ofn.local + Hostname 10.52.128.246 + User root + UserKnownHostsFile /dev/null + StrictHostKeyChecking no + PasswordAuthentication no + LogLevel FATAL +' >> "$HOME/.ssh/config" + +ansible-playbook -l lxc site.yml + +# Fail + +lxc restart ofn-dev +ansible-playbook -l lxc playbooks/provision.yml diff --git a/roles/common/tasks/main.yml b/roles/common/tasks/main.yml index 84d0025e5..821499c6a 100644 --- a/roles/common/tasks/main.yml +++ b/roles/common/tasks/main.yml @@ -14,7 +14,7 @@ vars: packages: # Ansible support - - python-pycurl + - python3-pycurl - python3-psycopg2 # unknown why or if needed