File tree Expand file tree Collapse file tree 5 files changed +18
-60
lines changed Expand file tree Collapse file tree 5 files changed +18
-60
lines changed Original file line number Diff line number Diff line change 2
2
sudo : required
3
3
language : objective-c
4
4
5
+ env :
6
+ global :
7
+ - ANSIBLE_FORCE_COLOR=true
8
+
5
9
# Reference for OS X Versions:
6
10
# https://docs.travis-ci.com/user/reference/osx/#macos-version
7
11
matrix :
@@ -60,11 +64,11 @@ script:
60
64
- " cp tests/config.yml config.yml"
61
65
62
66
# Test the playbook.
63
- - " travis_wait 30 ansible-playbook --extra-vars '{ \" configure_sudoers \" : \" false \" }' main.yml"
67
+ - " travis_wait 30 ansible-playbook main.yml"
64
68
65
69
# Test the playbook's idempotence.
66
70
- idempotence=$(mktemp)
67
- - " ansible-playbook --extra-vars '{ \" configure_sudoers \" : \" false \" }' main.yml | tee -a ${idempotence}"
71
+ - " ansible-playbook main.yml | tee -a ${idempotence}"
68
72
- >
69
73
tail ${idempotence}
70
74
| grep -q 'changed=0.*failed=0'
Original file line number Diff line number Diff line change 1
1
[defaults]
2
+ nocows = True
2
3
roles_path = ./roles:/etc/ansible/roles
3
4
4
5
[ssh_connection]
Original file line number Diff line number Diff line change 2
2
downloads : ~/.ansible-downloads/
3
3
4
4
configure_dotfiles : yes
5
- configure_sudoers : yes
6
5
configure_terminal : yes
7
6
configure_osx : yes
8
7
8
+ configure_sudoers : no
9
+ sudoers_custom_config : ' '
10
+ # Example:
11
+ # sudoers_custom_config: |
12
+ # # Allow users in admin group to use sudo with no password.
13
+ # %admin ALL=(ALL) NOPASSWD: ALL
14
+
9
15
dotfiles_repo : https://github.com/geerlingguy/dotfiles.git
10
16
dotfiles_repo_accept_hostkey : yes
11
17
dotfiles_repo_local_destination : ~/Development/GitHub/dotfiles
Original file line number Diff line number Diff line change 11
11
sed_path : " {{ sed_which_result.stdout }}"
12
12
when : sed_path is undefined
13
13
14
- # Sudoers configuration (enables more convenient Vagrant usage) .
14
+ # Sudoers configuration.
15
15
- name : Copy sudoers configuration into place.
16
- template :
17
- src : templates/sudoers.j2
18
- dest : /etc/sudoers
16
+ copy :
17
+ content : " {{ sudoers_custom_config }} "
18
+ dest : /private/ etc/sudoers.d/custom
19
19
mode : 0440
20
20
validate : ' visudo -cf %s'
21
21
become : yes
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments