Roots Discourse

'AnsibleUnicode' object has no attribute 'get_groups' during ansible deploy

ansible
#1

Long-time Sage developer, but new to the Ansible playbooks and Trellis/Bedrock.

I’m deploying to Kinsta using the instructions here.

When I deploy to remove servers, I’m getting the following error:

[WARNING]: Failure using method (v2_playbook_on_play_start) in callback plugin
(<ansible.plugins.callback.vars.CallbackModule object at 0x7fa5d80ced90>):
‘AnsibleUnicode’ object has no attribute ‘get_groups’

The deploy seems to succeed, but I’m uncertain what is causing this error or how to diagnose. Any Ansible gurus out there?

0 Likes

#2

Please share the contents of wordpress_sites.yml and vault.yml

0 Likes

#3

As I’m having the exact same issue on my staging env(also deploying on Kinsta)

Here are the contents of wordpress_sites.yml and vault.yml (which is encrypted)

# wordpress_sites.yml
    wordpress_sites:
      mykinstasite.com:
        site_hosts:
          - canonical: url.kinsta.cloud
            # redirects:
            #   - otherdomain.com
        local_path: ../site # path targeting local Bedrock site directory (relative to Ansible root)
        repo: git@github.com:phil-wpks/myrepo.git # replace with your Git repo URL
        repo_subtree_path: site # relative path to your Bedrock/WP directory in your repo
        branch: master
        multisite:
          enabled: false
        ssl:
          enabled: false
          provider: letsencrypt
        cache:
          enabled: false

vault
       mykinstasite.com:
        env:
          db_user: mykinstadbuser
          db_name: mykinstaname
          db_password: mypwd
          # Generate your keys here: https://roots.io/salts.html
 auth_key: "thesalt"
      secure_auth_key: "thesalt"
      logged_in_key: "thesalt"
      nonce_key: "thesalt"
      auth_salt: "thesalt"
      secure_auth_salt: "thesalt"
      logged_in_salt: "thesalt"
      nonce_salt: "thesalt"

Thanks for your help, I’m not 100% confident in my Trellis config

0 Likes