| # Add .gitconfig, _netrc, .boto, and oauth2_access_token_config.json files to a Skolo bot. Add |
| # metadata server to hosts file. |
| - hosts: all |
| tasks: |
| # .boto doesn't need to contain anything, just needs to be present. |
| - name: Create boto in root |
| win_file: |
| path: c:\.boto |
| state: touch |
| - name: Create boto in home |
| win_file: |
| path: c:\Users\chrome-bot\.boto |
| state: touch |
| - name: Copy oauth2_access_token_config.json to swarming_config |
| win_copy: |
| src: ../../common/oauth2_access_token_config.json |
| dest: C:\swarming_config\ |
| - name: Add metadata server to hosts file. |
| # This shouldn't be necessary, but I ran into |
| # https://superuser.com/questions/495759/why-is-ping-unable-to-resolve-a-name-when-nslookup-works-fine |
| # and none of the solutions worked. |
| win_lineinfile: |
| path: c:\Windows\System32\Drivers\etc\hosts |
| line: "192.168.1.20 metadata" |