ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Solved Can someone explain yaml spacing to me because Im going insane

    IT Discussion
    yaml formatting ansible
    2
    4
    562
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • DustinB3403D
      DustinB3403
      last edited by

      - name: Set up Macs
        hosts: apple_workstations
        user: admin
        become: true
      
        vars_files:
      	- /home/ansi/playbook-skeleton/vaulted_vars.yml
      
        vars:
      	ansible_become_pass: '{{ vaulted_become_pass }}'
      
        pre_tasks:
        # Create Ansible bin dir in home dir
      	- name: create ansible bin dir in home
      	  file: path=~/.ansible/bin/ state=directory
      
      # Copy temporary sudo ask pass script
      	- name: copy sudo ask pass script
      	  template:
      		src:    sudo_askpass.tmp.sh.j2
      		dest:   ~/.ansible/bin/sudo_askpass.tmp.sh
      		mode:   0700
      		backup: no
      
        environment:
      	SUDO_ASKPASS: "/usr/local/bin/sudo_askpass.tmp.sh"
      
        roles:
      	- { role: geerlingguy.homebrew,
      		homebrew_cask_apps: ['microsoft-teams','fontbase'],
      		homebrew_user: admin, homebrew_group: admin,
      		homebrew_cask_uninstalled_apps: ['1password','katana']}
      
        post_tasks:
      	- name: delete sudo ask pass script
      	  file: path=~/.ansible/bin/sudo_askpass.tmp.sh state=absent
      

      What is broken here?

      I'm aware there are tabs, this is due to Notepad++

      JaredBuschJ 1 Reply Last reply Reply Quote 0
      • DustinB3403D
        DustinB3403
        last edited by

        Nevermind!

        Missing the leading # for a comment. . .

        GAH

        1 Reply Last reply Reply Quote 2
        • JaredBuschJ
          JaredBusch @DustinB3403
          last edited by

          @DustinB3403 said in Can someone explain yaml spacing to me because Im going insane:

          I'm aware there are tabs, this is due to Notepad++

          There is a setting for that in Notepad++

          DustinB3403D 1 Reply Last reply Reply Quote 1
          • DustinB3403D
            DustinB3403 @JaredBusch
            last edited by

            @JaredBusch said in Can someone explain yaml spacing to me because Im going insane:

            @DustinB3403 said in Can someone explain yaml spacing to me because Im going insane:

            I'm aware there are tabs, this is due to Notepad++

            There is a setting for that in Notepad++

            I'll be searching for that tomorrow.

            1 Reply Last reply Reply Quote 0
            • 1 / 1
            • First post
              Last post