Skip to content
Snippets Groups Projects
Select Git revision
  • b74ec483d81afa8914c1e662ace7d4324565c275
  • master default
  • host01
  • ns4
  • kodi
5 results

README.md

Blame
  • openbsd_bootstrap.yml 706 B
    ---
    # Bootstrap an OpenBSD machine to be able to run Ansible on it.
    
    - name: Install Python
      raw: "PKG_PATH={{ openbsd_pkg_mirror }}/OpenBSD/$(uname -r)/packages/$(arch -s)/ /usr/sbin/pkg_add py-pip"
      register: openbsd_pkg_add_python
      changed_when: "'python' in openbsd_pkg_add_python.stdout"
    
    - name: Symlink python
      file:
        path: /usr/bin/python
        src: /usr/local/bin/python2.7
        state: link
        force: yes
    
    - name: Gather facts
      setup:
    
    - name: Configure pkg
      lineinfile:
        dest: /etc/pkg.conf
        line: 'installpath = {{ openbsd_pkg_mirror }}/OpenBSD/{{ ansible_distribution_release }}/packages/{{ ansible_architecture }}/'
        regexp: '^installpath ='
        state: present
        create: yes