2012-08-01 23:12:10 +00:00
Ansible Debian Package
======================
To create an Ansible DEB package:
2016-10-26 21:24:15 +00:00
__Note__: You must run this target as root or set `PBUILDER_BIN='sudo pbuilder'`
2012-08-01 23:12:10 +00:00
2016-10-26 21:24:15 +00:00
```
apt-get install asciidoc cdbs debootstrap devscripts make pbuilder python-setuptools
2017-10-03 19:16:25 +00:00
git clone https://github.com/ansible/ansible.git
2016-10-26 21:24:15 +00:00
cd ansible
DEB_DIST='xenial trusty precise' make deb
```
2016-03-18 10:07:23 +00:00
2016-10-26 21:24:15 +00:00
Building in Docker:
2016-03-18 10:07:23 +00:00
2016-10-26 21:24:15 +00:00
```
2017-10-03 19:16:25 +00:00
git clone https://github.com/ansible/ansible.git
2016-10-26 21:24:15 +00:00
cd ansible
docker build -t ansible-deb-builder -f packaging/debian/Dockerfile .
docker run --privileged -e DEB_DIST='trusty' -v $(pwd):/ansible ansible-deb-builder
```
The debian package file will be placed in the `deb-build` directory. This can then be added to an APT repository or installed with `dpkg -i <package-file>` .
2012-08-01 23:12:10 +00:00
2014-03-05 22:02:16 +00:00
Note that `dpkg -i` does not resolve dependencies.
2014-03-06 17:36:51 +00:00
To install the Ansible DEB package and resolve dependencies:
2014-03-05 22:02:16 +00:00
2016-10-26 21:24:15 +00:00
```
dpkg -i < package-file >
apt-get -fy install
```
2016-03-17 17:06:42 +00:00
Or, if you are running Debian Stretch (or later) or Ubuntu Xenial (or later):
2016-10-26 21:24:15 +00:00
```
apt install /path/to/< package-file >
```