# HG changeset patch # User Meredith Howard # Date 1497572947 14400 # Node ID 539425ad28ce44d13d4dcb835e9989ab257411e0 # Parent 37148a8955f03954b23655b1c3c5ed785b55b767 update for push/pull with notes diff --git a/README.md b/README.md --- 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 ``` diff --git a/ansible.cfg b/ansible.cfg --- a/ansible.cfg +++ b/ansible.cfg @@ -1,5 +1,4 @@ [defaults] -ask_sudo_pass = True retry_files_enabled = False [ssh_connection] diff --git a/playbook.yml b/local.yml rename from playbook.yml rename to local.yml