Directory mode takes something octalish, not a "yes".

So the error message seems quite right.

The permissions are not set because the module call failed.






On Wed, Aug 27, 2014 at 2:31 PM, John Oliver <[email protected]> wrote:

> This stanza:
>
> - name: Upload 'macsecurity' plugin
>   copy: src={{git_src}}/plugins/macsecurity
>         dest=/var/www/html/roundcube/plugins/
>         mode=0755
>         directory_mode=yes
>         group=roundcube
>
> Fails with:
>
> TASK: [roundcube-web | Upload 'macsecurity' plugin]
> ***************************
> failed: [jedis-test] => {"details": "invalid literal for int() with base
> 8: 'yes'", "failed": true, "gid": 500, "group": "roundcube", "md5sum":
> "59043bc3af8a7a48361bb2034b28cae8", "mode": "0700", "owner": "root",
> "path": "/var/www/html/roundcube/plugins/macsecurity/lib", "secontext":
> "unconfined_u:object_r:httpd_sys_content_t:s0", "size": 4096, "state":
> "directory", "uid": 0}
> msg: mode needs to be something octalish
>
> The error output just isn't correct or useful.  And the resulting
> permissions are wrong:
>
> drwx-w----. root roundcube unconfined_u:object_r:httpd_sys_content_t:s0
> macsecurity
>
> It's setting the permissions of files inside that directory to 755, which
> isn't what I want, and:
>
> [joliver@jedis-test ~]$ sudo ls -lZ
> /var/www/html/roundcube/plugins/macsecurity/
> -rwxr-xr-x. root roundcube system_u:object_r:httpd_sys_content_t:s0
> bootstrap_autoloader.php
> -rwxr-xr-x. root roundcube system_u:object_r:httpd_sys_content_t:s0
> composer.json
> -rwxr-xr-x. root roundcube system_u:object_r:httpd_sys_content_t:s0
> config.inc.php
> drwx------. root roundcube unconfined_u:object_r:httpd_sys_content_t:s0 lib
> -rwxr-xr-x. root roundcube system_u:object_r:httpd_sys_content_t:s0
> macsecurity.php
> -rwxr-xr-x. root roundcube system_u:object_r:httpd_sys_content_t:s0
> phpunit-bootstrap.php
> -rwxr-xr-x. root roundcube system_u:object_r:httpd_sys_content_t:s0
> phpunit.xml
> -rwxr-xr-x. root roundcube system_u:object_r:httpd_sys_content_t:s0
> readme.txt
>
>
> I've tried using seuser, but that isn't reliably applied, and doesn't make
> any difference (and nor should it).  Once I get all of my files up I'll set
> the context in one fell swoop, so I'm not worried about getting that
> correct during the transfer.
>
> I can't use 'synchronize' as it bombs out complaining there's no tty, and
> I have to assume that'll be required on my targets.
>
> I could zip or tar up the files, but I'm doing it that way I'm doing it
> because this directory is in git and may change.  I suppose I could create
> an archive every time the playbook is run, but that seems wasteful.
>
> How can I reliably and correctly transfer a directory?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/959e19b1-bbf0-480e-94b7-d87fb86cf4ec%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/959e19b1-bbf0-480e-94b7-d87fb86cf4ec%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CA%2BnsWgwY-U9tPFwZ7uoeCe7_3nzZf7hdf%3DYUJ2JozeV%2B47H3SQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to