Roots Discourse

No file was found when using first_found

Recently rebased to current HEAD, so may have missed a step or a file.

TASK [common : Import PHP version specific vars] *******************************
System info:
  Ansible 2.10.11; Darwin
  Trellis version (per changelog): "Fix #1284 - Update logrotate postrotate Nginx command"
An unhandled exception occurred while running the lookup plugin
'first_found'. Error was a <class 'ansible.errors.AnsibleLookupError'>,
original message: No file was found when using first_found. Use
errors='ignore' to allow this task to be skipped if no files are found
fatal: []: FAILED! => {}

What’s going on here, please?

- name: Import PHP version specific vars
  include_vars: "{{ lookup('first_found', params) }}"
        - '{{ php_version }}.yml'
        - '7.4.yml'
        - "{{ playbook_dir }}/roles/php/vars/"


I was missing the roles/php/vars directory.

For now, just added the 7.4.yml file:

  php7.4-bcmath: "{{ apt_package_state }}"
  php7.4-cli: "{{ apt_package_state }}"
  php7.4-curl: "{{ apt_package_state }}"
  php7.4-dev: "{{ apt_package_state }}"
  php7.4-fpm: "{{ apt_package_state }}"
  php7.4-imagick: "{{ apt_package_state }}"
  php7.4-intl: "{{ apt_package_state }}"
  php7.4-mbstring: "{{ apt_package_state }}"
  php7.4-mysql: "{{ apt_package_state }}"
  php7.4-xml: "{{ apt_package_state }}"
  php7.4-xmlrpc: "{{ apt_package_state }}"
  php7.4-zip: "{{ apt_package_state }}"

  php7.4-memcached: "{{ apt_package_state }}"

php_xdebug_package: php7.4-xdebug

Seems to be chugging along nicely.

Also needed to update

Do you have patched?

1 Like

Yes and no. For some reason, it seems that when I rebased, new files didn’t get merged in. Maybe I did something incorrectly in my interfacing with KDiff. Had to add some template files and also the php yml files at

Then just spun up new Ubuntu 20 servers, as opposed to trying to find the differences from the Ubuntu 18-oriented Trellis that the original servers were provisioned with.