Closed Taubin closed 1 year ago
Interesting that the Docker SDK for Python needs requests
and doesn't pull it in as a dependency.. Check how you installed that thing (docker-python
, python-docker
, etc). You may wish to install it on the Matrix server via pip.
You may also reconsider your choice of distro. 2018 was many years ago. I suggest you go for Ubuntu 22 or another more recent distro.
Upgrading the server isn't easy, this is an existing installation with existing users.
Check how you installed that thing (docker-python, python-docker, etc).
I'm not sure what you mean here. Do you mean python? Docker? Requests?
If it's requests, it's shown in my original post that it's already installed and pip shows it as existing.
Ubuntu 18.04.6 was released last year and is EOL in 2028. Standard support is still in effect until April 2023.
@spantaleev
Brand new 22.04 VPS I've run up. I've installed the prerequisites
ansible [core 2.13.7]
config file = /home/taubin/matrix-docker-ansible-deploy/ansible.cfg
configured module search path = ['/home/taubin/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python3/dist-packages/ansible
ansible collection location = /home/taubin/.ansible/collections:/usr/share/ansible/collections
executable location = /usr/bin/ansible
python version = 3.10.6 (main, Nov 14 2022, 16:10:14) [GCC 11.3.0]
jinja version = 3.0.3
libyaml = True
Python:
python3 --version
Python 3.10.6
Same yaml and host file as above
New errors
ansible-playbook -vvv -i inventory/hosts setup.yml --tags=install-all,ensure-matrix-users-created,start
ansible-playbook [core 2.13.7]
config file = /home/taubin/matrix-docker-ansible-deploy/ansible.cfg
configured module search path = ['/home/taubin/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python3/dist-packages/ansible
ansible collection location = /home/taubin/.ansible/collections:/usr/share/ansible/collections
executable location = /usr/bin/ansible-playbook
python version = 3.10.6 (main, Nov 14 2022, 16:10:14) [GCC 11.3.0]
jinja version = 3.0.3
libyaml = True
Using /home/taubin/matrix-docker-ansible-deploy/ansible.cfg as config file
host_list declined parsing /home/taubin/matrix-docker-ansible-deploy/inventory/hosts as it did not pass its verify_file() method
script declined parsing /home/taubin/matrix-docker-ansible-deploy/inventory/hosts as it did not pass its verify_file() method
auto declined parsing /home/taubin/matrix-docker-ansible-deploy/inventory/hosts as it did not pass its verify_file() method
Parsed /home/taubin/matrix-docker-ansible-deploy/inventory/hosts inventory source with ini plugin
statically imported: /home/taubin/matrix-docker-ansible-deploy/roles/custom/matrix-nginx-proxy/tasks/validate_config.yml
statically imported: /home/taubin/matrix-docker-ansible-deploy/roles/custom/matrix-nginx-proxy/tasks/ssl/main.yml
statically imported: /home/taubin/matrix-docker-ansible-deploy/roles/custom/matrix-nginx-proxy/tasks/ssl/setup_ssl_lets_encrypt.yml
statically imported: /home/taubin/matrix-docker-ansible-deploy/roles/custom/matrix-nginx-proxy/tasks/ssl/purge_ssl_lets_encrypt_orphaned_configs.yml
statically imported: /home/taubin/matrix-docker-ansible-deploy/roles/custom/matrix-nginx-proxy/tasks/ssl/setup_ssl_self_signed.yml
statically imported: /home/taubin/matrix-docker-ansible-deploy/roles/custom/matrix-nginx-proxy/tasks/ssl/setup_ssl_manually_managed.yml
statically imported: /home/taubin/matrix-docker-ansible-deploy/roles/custom/matrix-nginx-proxy/tasks/setup_nginx_proxy.yml
statically imported: /home/taubin/matrix-docker-ansible-deploy/roles/galaxy/com.devture.ansible.role.playbook_state_preserver/tasks/preserve_vars.yml
statically imported: /home/taubin/matrix-docker-ansible-deploy/roles/galaxy/com.devture.ansible.role.playbook_state_preserver/tasks/preserve_commit_hash.yml
redirecting (type: callback) ansible.builtin.yaml to community.general.yaml
redirecting (type: callback) ansible.builtin.yaml to community.general.yaml
Skipping callback 'default', as we already have a stdout callback.
Skipping callback 'minimal', as we already have a stdout callback.
Skipping callback 'oneline', as we already have a stdout callback.
PLAYBOOK: setup.yml ****************************************************************************************************
1 plays in setup.yml
PLAY [Set up a Matrix server] ******************************************************************************************
TASK [Gathering Facts] *************************************************************************************************
task path: /home/taubin/matrix-docker-ansible-deploy/setup.yml:2
Using module file /usr/lib/python3/dist-packages/ansible/modules/setup.py
Pipelining is enabled.
<[ip.redacted]> ESTABLISH LOCAL CONNECTION FOR USER: taubin
<[ip.redacted]> EXEC /bin/sh -c 'sudo -H -S -n -u root /bin/sh -c '"'"'echo BECOME-SUCCESS-iujbbyazqdvkcdariexowcolrcoxfulh ; /usr/bin/python3'"'"' && sleep 0'
ok: [matrix.[server.redacted]]
META: ran handlers
META:
META:
TASK [custom/matrix_playbook_migration : ansible.builtin.include_tasks] ************************************************
task path: /home/taubin/matrix-docker-ansible-deploy/roles/custom/matrix_playbook_migration/tasks/main.yml:4
included: /home/taubin/matrix-docker-ansible-deploy/roles/custom/matrix_playbook_migration/tasks/validate_config.yml for matrix.[server.redacted]
TASK [custom/matrix_playbook_migration : (Deprecation) Catch and report renamed Matrix playbook settings] **************
task path: /home/taubin/matrix-docker-ansible-deploy/roles/custom/matrix_playbook_migration/tasks/validate_config.yml:3
skipping: [matrix.[server.redacted]] => (item={'old': 'matrix_vars_yml_snapshotting_enabled', 'new': 'devture_playbook_state_preserver_vars_preservation_enabled'}) => changed=false
ansible_loop_var: item
item:
new: devture_playbook_state_preserver_vars_preservation_enabled
old: matrix_vars_yml_snapshotting_enabled
skip_reason: Conditional result was False
skipping: [matrix.[server.redacted]] => (item={'old': 'matrix_vars_yml_snapshotting_src', 'new': 'devture_playbook_state_preserver_vars_preservation_src'}) => changed=false
ansible_loop_var: item
item:
new: devture_playbook_state_preserver_vars_preservation_src
old: matrix_vars_yml_snapshotting_src
skip_reason: Conditional result was False
skipping: [matrix.[server.redacted]] => (item={'old': 'matrix_playbook_commit_hash_preservation_enabled', 'new': 'devture_playbook_state_preserver_commit_hash_preservation_enabled'}) => changed=false
ansible_loop_var: item
item:
new: devture_playbook_state_preserver_commit_hash_preservation_enabled
old: matrix_playbook_commit_hash_preservation_enabled
skip_reason: Conditional result was False
skipping: [matrix.[server.redacted]] => (item={'old': 'matrix_ntpd_package', 'new': 'devture_timesync_ntpd_package'}) => changed=false
ansible_loop_var: item
item:
new: devture_timesync_ntpd_package
old: matrix_ntpd_package
skip_reason: Conditional result was False
skipping: [matrix.[server.redacted]] => (item={'old': 'matrix_ntpd_service', 'new': 'devture_timesync_ntpd_service'}) => changed=false
ansible_loop_var: item
item:
new: devture_timesync_ntpd_service
old: matrix_ntpd_service
skip_reason: Conditional result was False
skipping: [matrix.[server.redacted]] => (item={'old': 'matrix_systemd_unit_home_path', 'new': 'devture_systemd_docker_base_systemd_unit_home_path'}) => changed=false
ansible_loop_var: item
item:
new: devture_systemd_docker_base_systemd_unit_home_path
old: matrix_systemd_unit_home_path
skip_reason: Conditional result was False
skipping: [matrix.[server.redacted]] => (item={'old': 'matrix_systemd_path', 'new': 'devture_systemd_docker_base_systemd_path'}) => changed=false
ansible_loop_var: item
item:
new: devture_systemd_docker_base_systemd_path
old: matrix_systemd_path
skip_reason: Conditional result was False
skipping: [matrix.[server.redacted]] => (item={'old': 'matrix_host_command_docker', 'new': 'devture_systemd_docker_base_host_command_docker'}) => changed=false
ansible_loop_var: item
item:
new: devture_systemd_docker_base_host_command_docker
old: matrix_host_command_docker
skip_reason: Conditional result was False
skipping: [matrix.[server.redacted]] => (item={'old': 'matrix_host_command_sh', 'new': 'devture_systemd_docker_base_host_command_sh'}) => changed=false
ansible_loop_var: item
item:
new: devture_systemd_docker_base_host_command_sh
old: matrix_host_command_sh
skip_reason: Conditional result was False
skipping: [matrix.[server.redacted]] => (item={'old': 'matrix_host_command_systemctl', 'new': 'devture_systemd_docker_base_host_command_systemctl'}) => changed=false
ansible_loop_var: item
item:
new: devture_systemd_docker_base_host_command_systemctl
old: matrix_host_command_systemctl
skip_reason: Conditional result was False
skipping: [matrix.[server.redacted]] => (item={'old': 'matrix_container_retries_count', 'new': 'devture_playbook_help_container_retries_count'}) => changed=false
ansible_loop_var: item
item:
new: devture_playbook_help_container_retries_count
old: matrix_container_retries_count
skip_reason: Conditional result was False
skipping: [matrix.[server.redacted]] => (item={'old': 'matrix_container_retries_delay', 'new': 'devture_playbook_help_container_retries_delay'}) => changed=false
ansible_loop_var: item
item:
new: devture_playbook_help_container_retries_delay
old: matrix_container_retries_delay
skip_reason: Conditional result was False
skipping: [matrix.[server.redacted]] => (item={'old': 'matrix_geturl_retries_count', 'new': 'devture_playbook_help_geturl_retries_count'}) => changed=false
ansible_loop_var: item
item:
new: devture_playbook_help_geturl_retries_count
old: matrix_geturl_retries_count
skip_reason: Conditional result was False
skipping: [matrix.[server.redacted]] => (item={'old': 'matrix_geturl_retries_delay', 'new': 'devture_playbook_help_geturl_retries_delay'}) => changed=false
ansible_loop_var: item
item:
new: devture_playbook_help_geturl_retries_delay
old: matrix_geturl_retries_delay
skip_reason: Conditional result was False
skipping: [matrix.[server.redacted]] => (item={'old': 'matrix_nginx_proxy_synapse_cache_path', 'new': 'matrix_synapse_reverse_proxy_companion_synapse_cache_path'}) => changed=false
ansible_loop_var: item
item:
new: matrix_synapse_reverse_proxy_companion_synapse_cache_path
old: matrix_nginx_proxy_synapse_cache_path
skip_reason: Conditional result was False
skipping: [matrix.[server.redacted]] => (item={'old': 'matrix_nginx_proxy_synapse_cache_enabled', 'new': 'matrix_synapse_reverse_proxy_companion_synapse_cache_enabled'}) => changed=false
ansible_loop_var: item
item:
new: matrix_synapse_reverse_proxy_companion_synapse_cache_enabled
old: matrix_nginx_proxy_synapse_cache_enabled
skip_reason: Conditional result was False
skipping: [matrix.[server.redacted]] => (item={'old': 'matrix_docker_installation_enabled', 'new': 'matrix_playbook_docker_installation_enabled'}) => changed=false
ansible_loop_var: item
item:
new: matrix_playbook_docker_installation_enabled
old: matrix_docker_installation_enabled
skip_reason: Conditional result was False
skipping: [matrix.[server.redacted]] => (item={'old': 'matrix_docker_package_name', 'new': '<Not applicable. Docker is installed using https://github.com/geerlingguy/ansible-role-docker now>'}) => changed=false
ansible_loop_var: item
item:
new: <Not applicable. Docker is installed using https://github.com/geerlingguy/ansible-role-docker now>
old: matrix_docker_package_name
skip_reason: Conditional result was False
skipping: [matrix.[server.redacted]] => (item={'old': 'matrix_systemd_services_list', 'new': 'devture_systemd_service_manager_services_list_additional'}) => changed=false
ansible_loop_var: item
item:
new: devture_systemd_service_manager_services_list_additional
old: matrix_systemd_services_list
skip_reason: Conditional result was False
skipping: [matrix.[server.redacted]] => (item={'old': 'matrix_common_after_systemd_service_start_wait_for_timeout_seconds', 'new': 'devture_systemd_service_manager_up_verification_delay_seconds'}) => changed=false
ansible_loop_var: item
item:
new: devture_systemd_service_manager_up_verification_delay_seconds
old: matrix_common_after_systemd_service_start_wait_for_timeout_seconds
skip_reason: Conditional result was False
skipping: [matrix.[server.redacted]] => (item={'old': 'matrix_systemd_services_autostart_enabled', 'new': 'devture_systemd_service_manager_services_autostart_enabled'}) => changed=false
ansible_loop_var: item
item:
new: devture_systemd_service_manager_services_autostart_enabled
old: matrix_systemd_services_autostart_enabled
skip_reason: Conditional result was False
TASK [custom/matrix_playbook_migration : (Deprecation) Catch and report matrix_postgres variables] *********************
task path: /home/taubin/matrix-docker-ansible-deploy/roles/custom/matrix_playbook_migration/tasks/validate_config.yml:38
skipping: [matrix.[server.redacted]] => changed=false
skip_reason: Conditional result was False
TASK [custom/matrix_playbook_migration : ansible.builtin.include_tasks] ************************************************
task path: /home/taubin/matrix-docker-ansible-deploy/roles/custom/matrix_playbook_migration/tasks/main.yml:10
included: /home/taubin/matrix-docker-ansible-deploy/roles/custom/matrix_playbook_migration/tasks/cleanup_usr_local_bin.yml for matrix.[server.redacted]
TASK [custom/matrix_playbook_migration : Find leftover matrix scripts in /usr/local/bin] *******************************
task path: /home/taubin/matrix-docker-ansible-deploy/roles/custom/matrix_playbook_migration/tasks/cleanup_usr_local_bin.yml:3
Using module file /usr/lib/python3/dist-packages/ansible/modules/find.py
Pipelining is enabled.
<[ip.redacted]> ESTABLISH LOCAL CONNECTION FOR USER: taubin
<[ip.redacted]> EXEC /bin/sh -c 'sudo -H -S -n -u root /bin/sh -c '"'"'echo BECOME-SUCCESS-qafapybnuvlgcuzhisiwhfrxlhhynlke ; /usr/bin/python3'"'"' && sleep 0'
ok: [matrix.[server.redacted]] => changed=false
examined: 0
files: []
invocation:
module_args:
age: null
age_stamp: mtime
contains: null
depth: null
excludes: null
file_type: file
follow: false
get_checksum: false
hidden: false
path: /usr/local/bin
paths:
- /usr/local/bin
patterns:
- matrix-change-user-admin-status
- matrix-dendrite-create-account
- matrix-make-user-admin
- matrix-postgres-cli
- matrix-postgres-cli-non-interactive
- matrix-postgres-update-user-password-hash
- matrix-remove-all
- matrix-ssl-certificates-renew
- matrix-ssl-lets-encrypt-certificates-renew
- matrix-synapse-register-user
- matrix-synapse-s3-storage-provider-migrate
- matrix-synapse-s3-storage-provider-shell
- matrix-synapse-worker-write-pid
read_whole_file: false
recurse: false
size: null
use_regex: false
matched: 0
msg: All paths examined
skipped_paths: {}
TASK [custom/matrix_playbook_migration : Ensure /usr/local/bin does not contain matrix scripts] ************************
task path: /home/taubin/matrix-docker-ansible-deploy/roles/custom/matrix_playbook_migration/tasks/cleanup_usr_local_bin.yml:22
META: role_complete for matrix.[server.redacted]
META:
META:
META:
TASK [custom/matrix-base : ansible.builtin.include_tasks] **************************************************************
task path: /home/taubin/matrix-docker-ansible-deploy/roles/custom/matrix-base/tasks/main.yml:4
included: /home/taubin/matrix-docker-ansible-deploy/roles/custom/matrix-base/tasks/validate_config.yml for matrix.[server.redacted]
TASK [custom/matrix-base : Fail if invalid homeserver implementation] **************************************************
task path: /home/taubin/matrix-docker-ansible-deploy/roles/custom/matrix-base/tasks/validate_config.yml:3
skipping: [matrix.[server.redacted]] => changed=false
skip_reason: Conditional result was False
TASK [custom/matrix-base : (Deprecation) Catch and report renamed settings] ********************************************
task path: /home/taubin/matrix-docker-ansible-deploy/roles/custom/matrix-base/tasks/validate_config.yml:8
skipping: [matrix.[server.redacted]] => (item={'old': 'host_specific_hostname_identity', 'new': 'matrix_domain'}) => changed=false
ansible_loop_var: item
item:
new: matrix_domain
old: host_specific_hostname_identity
skip_reason: Conditional result was False
skipping: [matrix.[server.redacted]] => (item={'old': 'hostname_identity', 'new': 'matrix_domain'}) => changed=false
ansible_loop_var: item
item:
new: matrix_domain
old: hostname_identity
skip_reason: Conditional result was False
skipping: [matrix.[server.redacted]] => (item={'old': 'hostname_matrix', 'new': 'matrix_server_fqn_matrix'}) => changed=false
ansible_loop_var: item
item:
new: matrix_server_fqn_matrix
old: hostname_matrix
skip_reason: Conditional result was False
skipping: [matrix.[server.redacted]] => (item={'old': 'hostname_riot', 'new': 'matrix_server_fqn_element'}) => changed=false
ansible_loop_var: item
item:
new: matrix_server_fqn_element
old: hostname_riot
skip_reason: Conditional result was False
skipping: [matrix.[server.redacted]] => (item={'old': 'matrix_server_fqn_riot', 'new': 'matrix_server_fqn_element'}) => changed=false
ansible_loop_var: item
item:
new: matrix_server_fqn_element
old: matrix_server_fqn_riot
skip_reason: Conditional result was False
skipping: [matrix.[server.redacted]] => (item={'old': 'matrix_local_bin_path', 'new': '<there is no global bin path anymore - each role has its own>'}) => changed=false
ansible_loop_var: item
item:
new: <there is no global bin path anymore - each role has its own>
old: matrix_local_bin_path
skip_reason: Conditional result was False
TASK [custom/matrix-base : Fail if matrix_homeserver_generic_secret_key is undefined] **********************************
task path: /home/taubin/matrix-docker-ansible-deploy/roles/custom/matrix-base/tasks/validate_config.yml:23
skipping: [matrix.[server.redacted]] => changed=false
skip_reason: Conditional result was False
TASK [custom/matrix-base : Fail if required variables are undefined] ***************************************************
task path: /home/taubin/matrix-docker-ansible-deploy/roles/custom/matrix-base/tasks/validate_config.yml:37
skipping: [matrix.[server.redacted]] => (item={'var': 'matrix_domain', 'value': '[server.redacted]'}) => changed=false
ansible_loop_var: item
item:
value: [server.redacted]
var: matrix_domain
skip_reason: Conditional result was False
skipping: [matrix.[server.redacted]] => (item={'var': 'matrix_server_fqn_matrix', 'value': 'matrix.[server.redacted]'}) => changed=false
ansible_loop_var: item
item:
value: matrix.[server.redacted]
var: matrix_server_fqn_matrix
skip_reason: Conditional result was False
skipping: [matrix.[server.redacted]] => (item={'var': 'matrix_server_fqn_element', 'value': 'element.[server.redacted]'}) => changed=false
ansible_loop_var: item
item:
value: element.[server.redacted]
var: matrix_server_fqn_element
skip_reason: Conditional result was False
skipping: [matrix.[server.redacted]] => (item={'var': 'matrix_homeserver_container_url', 'value': 'http://matrix-nginx-proxy:12080'}) => changed=false
ansible_loop_var: item
item:
value: http://matrix-nginx-proxy:12080
var: matrix_homeserver_container_url
skip_reason: Conditional result was False
skipping: [matrix.[server.redacted]] => (item={'var': 'matrix_homeserver_container_federation_url', 'value': 'http://matrix-nginx-proxy:12088'}) => changed=false
ansible_loop_var: item
item:
value: http://matrix-nginx-proxy:12088
var: matrix_homeserver_container_federation_url
skip_reason: Conditional result was False
skipping: [matrix.[server.redacted]] => (item={'var': 'matrix_architecture', 'value': 'amd64'}) => changed=false
ansible_loop_var: item
item:
value: amd64
var: matrix_architecture
skip_reason: Conditional result was False
TASK [custom/matrix-base : Fail if matrix_architecture is set incorrectly] *********************************************
task path: /home/taubin/matrix-docker-ansible-deploy/roles/custom/matrix-base/tasks/validate_config.yml:49
skipping: [matrix.[server.redacted]] => changed=false
skip_reason: Conditional result was False
TASK [custom/matrix-base : Fail if uppercase domain used] **************************************************************
task path: /home/taubin/matrix-docker-ansible-deploy/roles/custom/matrix-base/tasks/validate_config.yml:54
skipping: [matrix.[server.redacted]] => (item=[server.redacted]) => changed=false
ansible_loop_var: item
item: [server.redacted]
skip_reason: Conditional result was False
skipping: [matrix.[server.redacted]] => (item=matrix.[server.redacted]) => changed=false
ansible_loop_var: item
item: matrix.[server.redacted]
skip_reason: Conditional result was False
skipping: [matrix.[server.redacted]] => (item=element.[server.redacted]) => changed=false
ansible_loop_var: item
item: element.[server.redacted]
skip_reason: Conditional result was False
TASK [custom/matrix-base : Fail if encountering usage of removed role (mx-puppet-skype)] *******************************
task path: /home/taubin/matrix-docker-ansible-deploy/roles/custom/matrix-base/tasks/validate_config.yml:63
skipping: [matrix.[server.redacted]] => changed=false
skip_reason: Conditional result was False
TASK [custom/matrix-base : ansible.builtin.include_tasks] **************************************************************
task path: /home/taubin/matrix-docker-ansible-deploy/roles/custom/matrix-base/tasks/main.yml:12
included: /home/taubin/matrix-docker-ansible-deploy/roles/custom/matrix-base/tasks/setup_matrix_user.yml for matrix.[server.redacted]
TASK [custom/matrix-base : Ensure Matrix group is created] *************************************************************
task path: /home/taubin/matrix-docker-ansible-deploy/roles/custom/matrix-base/tasks/setup_matrix_user.yml:3
Using module file /usr/lib/python3/dist-packages/ansible/modules/group.py
Pipelining is enabled.
<[ip.redacted]> ESTABLISH LOCAL CONNECTION FOR USER: taubin
<[ip.redacted]> EXEC /bin/sh -c 'sudo -H -S -n -u root /bin/sh -c '"'"'echo BECOME-SUCCESS-uujjrshnjydazjahmmshxmqahhwywkkn ; /usr/bin/python3'"'"' && sleep 0'
ok: [matrix.[server.redacted]] => changed=false
gid: 1001
invocation:
module_args:
gid: null
local: false
name: matrix
non_unique: false
state: present
system: false
name: matrix
state: present
system: false
TASK [custom/matrix-base : Ensure Matrix user is created] **************************************************************
task path: /home/taubin/matrix-docker-ansible-deploy/roles/custom/matrix-base/tasks/setup_matrix_user.yml:10
Using module file /usr/lib/python3/dist-packages/ansible/modules/user.py
Pipelining is enabled.
<[ip.redacted]> ESTABLISH LOCAL CONNECTION FOR USER: taubin
<[ip.redacted]> EXEC /bin/sh -c 'sudo -H -S -n -u root /bin/sh -c '"'"'echo BECOME-SUCCESS-wokbwwlfueqoljwlzkglbnjfpbqghbkn ; /usr/bin/python3'"'"' && sleep 0'
ok: [matrix.[server.redacted]] => changed=false
append: false
comment: ''
group: 1001
home: /matrix
invocation:
module_args:
append: false
authorization: null
comment: null
create_home: false
expires: null
force: false
generate_ssh_key: null
group: matrix
groups: null
hidden: null
home: /matrix
local: null
login_class: null
move_home: false
name: matrix
non_unique: false
password: null
password_expire_max: null
password_expire_min: null
password_lock: null
profile: null
remove: false
role: null
seuser: null
shell: null
skeleton: null
ssh_key_bits: 0
ssh_key_comment: ansible-generated on s1
ssh_key_file: null
ssh_key_passphrase: null
ssh_key_type: rsa
state: present
system: true
uid: null
umask: null
update_password: always
move_home: false
name: matrix
shell: /bin/sh
state: present
uid: 998
TASK [custom/matrix-base : Initialize matrix_user_uid and matrix_user_gid] *********************************************
task path: /home/taubin/matrix-docker-ansible-deploy/roles/custom/matrix-base/tasks/setup_matrix_user.yml:21
ok: [matrix.[server.redacted]] => changed=false
ansible_facts:
matrix_user_gid: '1001'
matrix_user_uid: '998'
TASK [custom/matrix-base : ansible.builtin.include_tasks] **************************************************************
task path: /home/taubin/matrix-docker-ansible-deploy/roles/custom/matrix-base/tasks/main.yml:19
included: /home/taubin/matrix-docker-ansible-deploy/roles/custom/matrix-base/tasks/setup_matrix_base.yml for matrix.[server.redacted]
TASK [custom/matrix-base : Ensure Matrix base paths exists] ************************************************************
task path: /home/taubin/matrix-docker-ansible-deploy/roles/custom/matrix-base/tasks/setup_matrix_base.yml:3
Using module file /usr/lib/python3/dist-packages/ansible/modules/file.py
Pipelining is enabled.
<[ip.redacted]> ESTABLISH LOCAL CONNECTION FOR USER: taubin
<[ip.redacted]> EXEC /bin/sh -c 'sudo -H -S -n -u root /bin/sh -c '"'"'echo BECOME-SUCCESS-itakpynzvbkcnipwknxbqvcvvsgrthsy ; /usr/bin/python3'"'"' && sleep 0'
ok: [matrix.[server.redacted]] => (item=/matrix) => changed=false
ansible_loop_var: item
diff:
after:
path: /matrix
before:
path: /matrix
gid: 1001
group: matrix
invocation:
module_args:
_diff_peek: null
_original_basename: null
access_time: null
access_time_format: '%Y%m%d%H%M.%S'
attributes: null
follow: true
force: false
group: matrix
mode: '750'
modification_time: null
modification_time_format: '%Y%m%d%H%M.%S'
owner: matrix
path: /matrix
recurse: false
selevel: null
serole: null
setype: null
seuser: null
src: null
state: directory
unsafe_writes: false
item: /matrix
mode: '0750'
owner: matrix
path: /matrix
size: 4096
state: directory
uid: 998
Using module file /usr/lib/python3/dist-packages/ansible/modules/file.py
Pipelining is enabled.
<[ip.redacted]> EXEC /bin/sh -c 'sudo -H -S -n -u root /bin/sh -c '"'"'echo BECOME-SUCCESS-ixeioccrqffhvhkrksfpybvkgscacald ; /usr/bin/python3'"'"' && sleep 0'
ok: [matrix.[server.redacted]] => (item=/matrix/bin) => changed=false
ansible_loop_var: item
diff:
after:
path: /matrix/bin
before:
path: /matrix/bin
gid: 1001
group: matrix
invocation:
module_args:
_diff_peek: null
_original_basename: null
access_time: null
access_time_format: '%Y%m%d%H%M.%S'
attributes: null
follow: true
force: false
group: matrix
mode: '750'
modification_time: null
modification_time_format: '%Y%m%d%H%M.%S'
owner: matrix
path: /matrix/bin
recurse: false
selevel: null
serole: null
setype: null
seuser: null
src: null
state: directory
unsafe_writes: false
item: /matrix/bin
mode: '0750'
owner: matrix
path: /matrix/bin
size: 4096
state: directory
uid: 998
TASK [custom/matrix-base : Ensure Matrix network is created in Docker] *************************************************
task path: /home/taubin/matrix-docker-ansible-deploy/roles/custom/matrix-base/tasks/setup_matrix_base.yml:14
Using module file /usr/lib/python3/dist-packages/ansible_collections/community/docker/plugins/modules/docker_network.py
Pipelining is enabled.
<[ip.redacted]> ESTABLISH LOCAL CONNECTION FOR USER: taubin
<[ip.redacted]> EXEC /bin/sh -c 'sudo -H -S -n -u root /bin/sh -c '"'"'echo BECOME-SUCCESS-xnaozxtimphniilndpozzyobdyvunnsi ; /usr/bin/python3'"'"' && sleep 0'
The full traceback is:
Traceback (most recent call last):
File "/tmp/ansible_community.docker.docker_network_payload_fu370x5b/ansible_community.docker.docker_network_payload.zip/ansible_collections/community/docker/plugins/module_utils/common.py", line 33, in <module>
from docker import __version__ as docker_version
ModuleNotFoundError: No module named 'docker'
fatal: [matrix.[server.redacted]]: FAILED! => changed=false
invocation:
module_args:
api_version: auto
appends: false
attachable: null
ca_cert: null
client_cert: null
client_key: null
connected: []
debug: false
docker_host: unix://var/run/docker.sock
driver: bridge
driver_options: {}
enable_ipv6: null
force: false
internal: null
ipam_config: null
ipam_driver: null
ipam_driver_options: null
labels: {}
name: matrix
scope: null
ssl_version: null
state: present
timeout: 60
tls: false
tls_hostname: null
use_ssh_client: false
validate_certs: false
msg: 'Failed to import the required Python library (Docker SDK for Python: docker above 5.0.0 (Python >= 3.6) or docker before 5.0.0 (Python 2.7) or docker-py (Python 2.6)) on s1''s Python /usr/bin/python3. Please read the module documentation and install it in the appropriate location. If the required library is installed, but Ansible is using the wrong Python interpreter, please consult the documentation on ansible_python_interpreter, for example via `pip install docker` (Python >= 3.6) or `pip install docker==4.4.4` (Python 2.7) or `pip install docker-py` (Python 2.6). The error was: No module named ''docker'''
PLAY RECAP *************************************************************************************************************
matrix.[server.redacted] : ok=11 changed=0 unreachable=0 failed=1 skipped=10 rescued=0 ignored=0
Just ran into this issue as well on Ubuntu 22.04.
Additional steps taken on the target machine:
sudo apt install python3-pip python3-docker python-is-python3 -y
pip install docker docker-compose
Which gets me a bit further in the ansible deploy, but produces a new error message:
TASK [custom/matrix-base : Ensure Matrix network is created in Docker] **************************************************************
fatal: [matrix.mydomain.com]: FAILED! => changed=false
msg: 'Error connecting: Error while fetching server API version: (''Connection aborted.'', FileNotFoundError(2, ''No such file or directory''))'
Update - I manually installed docker on the target machine to get around the error:
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt update
sudo apt install docker-ce -y
Now it gets stuck here:
TASK [galaxy/com.devture.ansible.role.systemd_service_manager : include_tasks] ******************************************************
included: /home/scasey/matrix-docker-ansible-deploy/roles/galaxy/com.devture.ansible.role.systemd_service_manager/tasks/restart_specified.yml for matrix.caseylabs.com
TASK [galaxy/com.devture.ansible.role.systemd_service_manager : Ensure systemd is reloaded] *****************************************
ok: [matrix.caseylabs.com]
TASK [galaxy/com.devture.ansible.role.systemd_service_manager : Ensure systemd services are stopped] ********************************
fatal: [matrix.mydomain.com]: FAILED! =>
msg: '''dict object'' has no attribute ''priority,name'''
pip install -U Jinja2
fixed the above issue
Had to manually install docker and Jinja2 too
Imho this might be due to an error in the docs:
The first inital run needs to use the tag setup-all
not install-all
since only setup-all
will also call the geerlingguy-ansible role to install docker and requirements.
so it should be
ansible-playbook -i inventory/hosts setup.yml --tags=setup-all,ensure-matrix-users-created,start
Edit:
That might be wrong also and running into an error.
However - running the playbook with setup-all
will definitely install the docker requirements you need to being with
The bug is not in the documentation, but in setup.yml
. The install-*
tags should have been added there. It's fixed now.
Thanks for reporting it and finding the problem!
awesome - thanks for your quick fix
Playbook Configuration:
My
vars.yml
file looks like this:Matrix Server:
Ansible: If your problem appears to be with Ansible, tell us:
Ansible is being run on the server itself
ansible --version
)Problem description:
I'm attempting to update a previous version of the ansible playbook. I've pulled the latest and run make roles to make sure the roles are correct. I'm recieving the following error when the playbook is run:
I've verified requests is installed:
Full log from install:
Additional context Add any other context about the problem here.