diff --git a/installer/inventory b/installer/inventory index d1a742d314..fb966933eb 100644 --- a/installer/inventory +++ b/installer/inventory @@ -90,3 +90,7 @@ pg_port=5432 #awx_container_search_domains=example.com,ansible.com # Alternate DNS servers #awx_alternate_dns_servers="10.1.2.3,10.2.3.4" + +# AWX project data folder. If you need access to the location where AWX stores the projects +# it manages from the docker host, you can set this to turn it into a volume for the container. +#project_data_dir=/var/lib/awx/projects \ No newline at end of file diff --git a/installer/local_docker/tasks/standalone.yml b/installer/local_docker/tasks/standalone.yml index f6a51f71d1..ac23f74e66 100644 --- a/installer/local_docker/tasks/standalone.yml +++ b/installer/local_docker/tasks/standalone.yml @@ -79,6 +79,7 @@ state: started restart_policy: unless-stopped image: "{{ awx_web_docker_actual_image }}" + volumes: "{{ project_data_dir + ':/var/lib/awx/projects:rw' if project_data_dir is defined else omit }}" user: root ports: - "{{ host_port }}:8052" @@ -112,6 +113,7 @@ state: started restart_policy: unless-stopped image: "{{ awx_task_docker_actual_image }}" + volumes: "{{ project_data_dir + ':/var/lib/awx/projects:rw' if project_data_dir is defined else omit }}" links: "{{ awx_task_container_links|list }}" user: root hostname: awx