mirror of
https://github.com/ansible/awx.git
synced 2026-02-15 18:20:00 -03:30
isolated ramparts: replace systemd unit with a tower-expect binary
instead of launching isolated tasks via `systemctl`, treat `awx.main.isolated.run` as an executable that knows how to daemonize additionally, add `setup.py isolated_build` for isolated Tower source distribution
This commit is contained in:
@@ -17,7 +17,7 @@ ENV LANGUAGE en_US:en
|
||||
ENV LC_ALL en_US.UTF-8
|
||||
WORKDIR /
|
||||
EXPOSE 22
|
||||
ADD tools/docker-isolated/playbook@.service /lib/systemd/system/playbook@.service
|
||||
ADD tools/docker-isolated/tower-expect /usr/local/bin/tower-expect
|
||||
|
||||
RUN rm -f /etc/ssh/ssh_host_ecdsa_key /etc/ssh/ssh_host_rsa_key
|
||||
RUN ssh-keygen -q -N "" -t dsa -f /etc/ssh/ssh_host_ecdsa_key
|
||||
|
||||
@@ -66,6 +66,6 @@ This should give a shell to the `tools_isolated_1` container, as the
|
||||
The following command would run the playbook for job 57.
|
||||
|
||||
```bash
|
||||
systemctl start playbook@57.service
|
||||
tower-expect start 57
|
||||
```
|
||||
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
[Unit]
|
||||
Description=Run of Ansible Tower job %I
|
||||
|
||||
[Service]
|
||||
ExecStart=/venv/tower_isolated/bin/python /tower_isolated/run.py %I
|
||||
Restart=no
|
||||
Environment=TOWER_LIB_DIRECTORY=/tower_lib
|
||||
3
tools/docker-isolated/tower-expect
Executable file
3
tools/docker-isolated/tower-expect
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
. /venv/tower_isolated/bin/activate
|
||||
exec env TOWER_LIB_DIRECTORY=/tower_lib /tower_isolated/run.py "$@"
|
||||
Reference in New Issue
Block a user