Skip to content

Data failed to compile for load-balance init #3

@erikv85

Description

@erikv85

Hi, in the section "Load Balancing Configuration via a New Role" in the Pluralsight course, the file /srv/salt/load-balance/init.sls is shown as:

nginx:                                                                                                   
  pkg.installed: []                                                                                      
  service.running:                                                                                       
    watch:                                                                                             
      file: /etc/nginx/nginx.conf                                                                      
                                                                                                         
/etc/nginx/nginx.conf:                                                                                   
  file.managed:                                                                                          
    - source: salt://load-balance/nginx.conf

You're then able to run state.apply, but in my case I get:

$ sudo salt minion1 state.apply                                                                                                                                                                
minion1:                                                                                                                                                                                                           
    Data failed to compile:                                                             
----------                                     
    State 'nginx' in SLS 'load-balance' is not formed as a list

Fixed by inserting - before watch and file, as in /srv/salt/hwaas-service/init.sls.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions