update for push/pull with notes

Thu, 15 Jun 2017 20:29:07 -0400

author
Meredith Howard <mhoward@roomag.org>
date
Thu, 15 Jun 2017 20:29:07 -0400
changeset 68
539425ad28ce
parent 67
37148a8955f0
child 69
292cb125556d

update for push/pull with notes

README.md file | annotate | diff | comparison | revisions
ansible.cfg file | annotate | diff | comparison | revisions
local.yml file | annotate | diff | comparison | revisions
playbook.yml file | annotate | diff | comparison | revisions
--- a/README.md
+++ b/README.md
@@ -6,12 +6,22 @@ It's best-tested on Debian, but has some
 
 The `gui_enabled` var controls whether or not to install graphical tools.
 
-## TODO
+# Running
+
+## Push
 
-- Adjust to work with ansible-pull via cloud-config userdata like below.
-  - looks for hostname.yml or local.yml
-  - no need to `become` at start, it will run as root
-  - ansible.cfg set to ask for sudo pw
+1. Create inventory file with target host.
+2. If we can ssh as root with key, use `-u root`.  If we can sudo, use `-bK`.
+3. GUI box? `-e gui_enabled=true`
+4. `ansible-playbook -i $inventory $args local.yml`
+
+## Pull
+
+1. Install `ansible`, `git`
+2. `echo -e '[localhost]\n127.0.0.1 ansible_connection=local' >> /etc/ansible/hosts`
+2. `ansible-pull -U https://github.com/merrilymeredith/devbox-ansible.git`
+
+### cloud-init
 
 ```yaml
 #cloud-config
@@ -20,8 +30,6 @@ packages:
   - git
 runcmd:
   - echo -e '[localhost]\n127.0.0.1 ansible_connection=local' >> /etc/ansible/hosts
-  - ssh-keyscan github.com >> /etc/ssh/ssh_known_hosts
-  - mkdir /etc/ansible/web
-  - ansible-pull -d /etc/ansible/web -U https://github.com/merrilymeredith/devbox-ansible.git
+  - ansible-pull -U https://github.com/merrilymeredith/devbox-ansible.git
 ```
 
--- a/ansible.cfg
+++ b/ansible.cfg
@@ -1,5 +1,4 @@
 [defaults]
-ask_sudo_pass = True
 retry_files_enabled = False
 
 [ssh_connection]
rename from playbook.yml
rename to local.yml

mercurial