<p dir="auto"><em>From <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/tumbl3w33d/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/tumbl3w33d">@tumbl3w33d</a> on October 14, 2016 12:57</em></p>
<h5 dir="auto">ISSUE TYPE</h5>
<ul dir="auto">
<li>Bug Report</li>
</ul>
<h5 dir="auto">COMPONENT NAME</h5>
<p dir="auto">docker_container</p>
<h5 dir="auto">ANSIBLE VERSION</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible 2.2.0 (devel 28feba2fb3) last updated 2016/09/14 12:25:32 (GMT +200)
  lib/ansible/modules/core: (detached HEAD ae6992bf8c) last updated 2016/09/14 12:25:32 (GMT +200)
  lib/ansible/modules/extras: (detached HEAD afd0b23836) last updated 2016/09/14 12:25:32 (GMT +200)"><pre class="notranslate"><code class="notranslate">ansible 2.2.0 (devel 28feba2fb3) last updated 2016/09/14 12:25:32 (GMT +200)
  lib/ansible/modules/core: (detached HEAD ae6992bf8c) last updated 2016/09/14 12:25:32 (GMT +200)
  lib/ansible/modules/extras: (detached HEAD afd0b23836) last updated 2016/09/14 12:25:32 (GMT +200)
</code></pre></div>
<h5 dir="auto">CONFIGURATION</h5>
<p dir="auto">N/A</p>
<h5 dir="auto">OS / ENVIRONMENT</h5>
<p dir="auto">N/A</p>
<h5 dir="auto">SUMMARY</h5>
<p dir="auto">Docker uses the log driver 'json-file' by default (also stated in the docker_container documentation). If you want to provide log_options (e.g. for log rotation) you have to explicitly set the log_driver to json-file, else this module attribute is ignored, although it should IMHO assume the Docker default.</p>
<p dir="auto">This behavior is probably caused by the <a href="https://github.com/ansible/ansible-modules-core/blob/devel/cloud/docker/docker_container.py#L1091">following code</a></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="    def _parse_log_config(self):
        '''
        Create a LogConfig object
        '''
        if self.log_driver is None:
            return None"><pre class="notranslate"><code class="notranslate">    def _parse_log_config(self):
        '''
        Create a LogConfig object
        '''
        if self.log_driver is None:
            return None
</code></pre></div>
<h5 dir="auto">STEPS TO REPRODUCE</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="  docker_container:
    name: mongodb
    image: bitnami/mongodb
    log_options:
      max-size: &quot;512m&quot;
      max-file: &quot;5&quot;"><pre class="notranslate"><code class="notranslate">  docker_container:
    name: mongodb
    image: bitnami/mongodb
    log_options:
      max-size: "512m"
      max-file: "5"
</code></pre></div>
<h5 dir="auto">EXPECTED RESULTS</h5>
<p dir="auto">When you check the specs of the running container (docker inspect) you see should see the passed log options.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="            &quot;LogConfig&quot;: {
                &quot;Type&quot;: &quot;json-file&quot;,
                &quot;Config&quot;: {
                    &quot;max-file&quot;: &quot;5&quot;,
                    &quot;max-size&quot;: &quot;512m&quot;
                }"><pre class="notranslate"><code class="notranslate">            "LogConfig": {
                "Type": "json-file",
                "Config": {
                    "max-file": "5",
                    "max-size": "512m"
                }
</code></pre></div>
<h5 dir="auto">ACTUAL RESULTS</h5>
<p dir="auto">When you check the specs of the running container you see that the log config block is empty.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="            &quot;LogConfig&quot;: {
                &quot;Type&quot;: &quot;json-file&quot;,
                &quot;Config&quot;: {}
            },"><pre class="notranslate"><code class="notranslate">            "LogConfig": {
                "Type": "json-file",
                "Config": {}
            },
</code></pre></div>
<p dir="auto"><em>Copied from original issue: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="183043274" data-permission-text="Title is private" data-url="https://github.com/ansible/ansible-modules-core/issues/5269" data-hovercard-type="issue" data-hovercard-url="/ansible/ansible-modules-core/issues/5269/hovercard" href="https://github.com/ansible/ansible-modules-core/issues/5269">ansible/ansible-modules-core#5269</a></em></p>
<p dir="auto"><em>From <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/juju4/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/juju4">@juju4</a> on November 27, 2015 2:47</em></p>
<h5 dir="auto">ISSUE TYPE</h5>
<p dir="auto">Feature Idea</p>
<h5 dir="auto">COMPONENT NAME</h5>
<p dir="auto">mount module</p>
<h5 dir="auto">ANSIBLE VERSION</h5>
<p dir="auto">N/A</p>
<h5 dir="auto">SUMMARY</h5>
<p dir="auto">Hello,</p>
<p dir="auto">For temporary need, it should be possible to mount a filesystem without adding it to fstab</p>
<p dir="auto"><a href="http://docs.ansible.com/ansible/mount_module.html" rel="nofollow">http://docs.ansible.com/ansible/mount_module.html</a><br>
The state values should be updated<br>
present<br>
absent<br>
mounted (just mount)<br>
mountedandpresent (mount+fstab)<br>
unmounted (unmount)<br>
unmountedandpresent (unmount but keep in fstab; ex: with opts noauto - only manual usage)</p>
<p dir="auto">My main use case is using ansible for mass forensics collections and try to minimize as much as possible modifications to the system</p>
<p dir="auto">Thanks</p>
<p dir="auto"><em>Copied from original issue: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="119123700" data-permission-text="Title is private" data-url="https://github.com/ansible/ansible-modules-core/issues/2571" data-hovercard-type="issue" data-hovercard-url="/ansible/ansible-modules-core/issues/2571/hovercard" href="https://github.com/ansible/ansible-modules-core/issues/2571">ansible/ansible-modules-core#2571</a></em></p>