2012-08-02 01:12:10 +02:00
Ansible Debian Package
======================
To create an Ansible DEB package:
2016-10-26 23:24:15 +02:00
__Note__: You must run this target as root or set `PBUILDER_BIN='sudo pbuilder'`
2012-08-02 01:12:10 +02:00
2016-10-26 23:24:15 +02:00
```
apt-get install asciidoc cdbs debootstrap devscripts make pbuilder python-setuptools
2017-10-03 21:16:25 +02:00
git clone https://github.com/ansible/ansible.git
2016-10-26 23:24:15 +02:00
cd ansible
git submodule update --init
DEB_DIST='xenial trusty precise' make deb
```
2016-03-18 11:07:23 +01:00
2016-10-26 23:24:15 +02:00
Building in Docker:
2016-03-18 11:07:23 +01:00
2016-10-26 23:24:15 +02:00
```
2017-10-03 21:16:25 +02:00
git clone https://github.com/ansible/ansible.git
2016-10-26 23:24:15 +02:00
cd ansible
git submodule update --init
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-02 01:12:10 +02:00
2014-03-05 23:02:16 +01:00
Note that `dpkg -i` does not resolve dependencies.
2014-03-06 18:36:51 +01:00
To install the Ansible DEB package and resolve dependencies:
2014-03-05 23:02:16 +01:00
2016-10-26 23:24:15 +02:00
```
dpkg -i < package-file >
apt-get -fy install
```
2016-03-17 18:06:42 +01:00
Or, if you are running Debian Stretch (or later) or Ubuntu Xenial (or later):
2016-10-26 23:24:15 +02:00
```
apt install /path/to/< package-file >
```