Skip to content

Commit

Permalink
Use ansible/python in a pipenv virtualenv.
Browse files Browse the repository at this point in the history
  • Loading branch information
jackson15j committed Jan 19, 2019
1 parent 4182a63 commit 99a4c11
Show file tree
Hide file tree
Showing 4 changed files with 254 additions and 1 deletion.
12 changes: 12 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true

[dev-packages]

[packages]
ansible = "*"

[requires]
python_version = "3.7"
235 changes: 235 additions & 0 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ command, which will prompt for sudo password (pacman package installation) due
to the `-K` or `--ask-become-pass` flag:

```bash
ansible-playbook main.yml -i hosts -K
pipenv install
pipenv run ansible-playbook -K main.yml
```

Tags
Expand Down
5 changes: 5 additions & 0 deletions update_pacman.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
---
- name: Update & upgrade pacman once at start of ansible
hosts: localhost
vars:
ansible_python_interpreter: "/usr/bin/env python"
tasks:
- set_fact:
ansible_python_interpreter: "{{ansible_python_interpreter}}"

- name:
# http://docs.ansible.com/ansible/become.html
become: true
Expand Down

0 comments on commit 99a4c11

Please sign in to comment.