From: Lorin Hochstein Date: Sat, 7 Feb 2015 23:30:22 +0000 (-0500) Subject: Add ch09 X-Git-Url: https://git.halfball.org/?a=commitdiff_plain;h=87f5660c51580b48a5f348c86f67ed026db67915;p=ansiblebook.git Add ch09 --- diff --git a/ch09/playbooks/ansible.cfg b/ch09/playbooks/ansible.cfg new file mode 100644 index 0000000..4c49145 --- /dev/null +++ b/ch09/playbooks/ansible.cfg @@ -0,0 +1,9 @@ +[defaults] +pipelining = True +gathering = smart +fact_caching = redis +fact_caching_timeout = 86400 +forks = 20 + +[ssh_connection] +control_path = %(directory)s/%%h-%%r diff --git a/ch09/playbooks/disable-requiretty.yml b/ch09/playbooks/disable-requiretty.yml new file mode 100644 index 0000000..32304d4 --- /dev/null +++ b/ch09/playbooks/disable-requiretty.yml @@ -0,0 +1,11 @@ +--- +- name: do not require tty for ssh-ing user + hosts: myhosts + sudo: True + tasks: + - name: Set a sudoers file to disable tty + template: > + src=templates/disable-requiretty.j2 + dest=/etc/sudoers.d/disable-requiretty + owner=root group=root mode=0440 + validate="visudo -cf %s" diff --git a/ch09/playbooks/templates/disable-requiretty.j2 b/ch09/playbooks/templates/disable-requiretty.j2 new file mode 100644 index 0000000..9a5cbaf --- /dev/null +++ b/ch09/playbooks/templates/disable-requiretty.j2 @@ -0,0 +1 @@ +Defaults:{{ ansible_ssh_user }} !requiretty