Changeset 13847 for main/waeup-ansible


Ignore:
Timestamp:
21 Apr 2016, 21:11:43 (9 years ago)
Author:
uli
Message:

Fix task for modifying sudoers file.

As colon followed by space (': ') is interpreted by PyYAML erranous (a
well-known problem, as it looks), we have to do tricks. "Quoting" the
colon with the "{{ ':' }}" expression helps.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup-ansible/bootstrap.yml

    r13845 r13847  
    3232    - name: "bootstrap | grant sudoers perms to 'deploy'"
    3333      lineinfile:
    34         "dest=/etc/sudoers
    35         insertafter=EOF
    36         line='{{ deploy_user }} ALL=(ALL) NOPASSWD: ALL'
    37         regexp='{{ deploy_user }} ALL=(ALL) NOPASSWD: ALL'
    38         state=present"
     34        dest=/etc/sudoers
     35        insertafter="^root"
     36        line="{{ deploy_user }}  ALL=(ALL) NOPASSWD{{ ':' }} ALL"
     37        state=present
    3938
    4039    - name: "bootstrap | disable dsa keys in sshd_config"
Note: See TracChangeset for help on using the changeset viewer.