mirror of
https://github.com/geerlingguy/mac-dev-playbook
synced 2024-11-22 03:43:06 +00:00
Another try for getting sudoers config to go away.
This commit is contained in:
parent
8997b82632
commit
d32b1d7b14
1 changed files with 3 additions and 3 deletions
|
@ -24,7 +24,7 @@ install:
|
||||||
# Add a hosts file.
|
# Add a hosts file.
|
||||||
- sudo mkdir -p /etc/ansible
|
- sudo mkdir -p /etc/ansible
|
||||||
- sudo touch /etc/ansible/hosts
|
- sudo touch /etc/ansible/hosts
|
||||||
- "echo -e '[local]\nlocalhost ansible_connection=local configure_sudoers=false' | sudo tee -a /etc/ansible/hosts > /dev/null"
|
- "echo -e '[local]\nlocalhost ansible_connection=local' | sudo tee -a /etc/ansible/hosts > /dev/null"
|
||||||
|
|
||||||
script:
|
script:
|
||||||
# Install dependencies.
|
# Install dependencies.
|
||||||
|
@ -34,11 +34,11 @@ script:
|
||||||
- "ansible-playbook main.yml --syntax-check"
|
- "ansible-playbook main.yml --syntax-check"
|
||||||
|
|
||||||
# Test the playbook.
|
# Test the playbook.
|
||||||
- "ansible-playbook main.yml"
|
- "ansible-playbook --extra-vars '{"configure_sudoers":"false"}' main.yml"
|
||||||
|
|
||||||
# Test the playbook's idempotence.
|
# Test the playbook's idempotence.
|
||||||
- idempotence=$(mktemp)
|
- idempotence=$(mktemp)
|
||||||
- "ansible-playbook main.yml | tee -a ${idempotence}"
|
- "ansible-playbook --extra-vars '{"configure_sudoers":"false"}' main.yml | tee -a ${idempotence}"
|
||||||
- >
|
- >
|
||||||
tail ${idempotence}
|
tail ${idempotence}
|
||||||
| grep -q 'changed=0.*failed=0'
|
| grep -q 'changed=0.*failed=0'
|
||||||
|
|
Loading…
Reference in a new issue