diff options
author | Guilhem Moulin <guilhem@fripost.org> | 2016-05-18 00:10:50 +0200 |
---|---|---|
committer | Guilhem Moulin <guilhem@fripost.org> | 2016-05-18 00:47:05 +0200 |
commit | 71aefcc229f999f92b25e51b9444b313d95fbc86 (patch) | |
tree | 0cfda622ac987e35543361dcc478dfe6b5b3fa08 | |
parent | f4c280d1c6f43f7ca0c1e498ab87fe7aa08d5eb2 (diff) |
Add an ansible module 'fetch_cmd' to fetch the output of a remote command locally.
And use this to fetch all X.509 leaf certificates.
-rw-r--r-- | certs/public/fripost.org.pem | 27 | ||||
-rw-r--r-- | certs/public/git.fripost.org.pem | 27 | ||||
-rw-r--r-- | certs/public/imap.fripost.org.pem | 27 | ||||
-rw-r--r-- | certs/public/lists.fripost.org.pem | 27 | ||||
-rw-r--r-- | certs/public/mail.fripost.org.pem | 27 | ||||
-rw-r--r-- | certs/public/mx1.fripost.org.pem | 27 | ||||
-rw-r--r-- | certs/public/mx2.fripost.org.pem | 27 | ||||
-rw-r--r-- | certs/public/smtp.fripost.org.pem | 27 | ||||
-rw-r--r-- | lib/action_plugins/fetch_cmd.py | 61 | ||||
-rw-r--r-- | lib/modules/fetch_cmd.py | 56 | ||||
-rw-r--r-- | roles/IMAP/tasks/imap.yml | 7 | ||||
-rw-r--r-- | roles/MSA/tasks/main.yml | 7 | ||||
-rw-r--r-- | roles/MX/tasks/main.yml | 7 | ||||
-rw-r--r-- | roles/bacula-dir/tasks/main.yml | 7 | ||||
-rw-r--r-- | roles/bacula-sd/tasks/main.yml | 7 | ||||
-rw-r--r-- | roles/common-LDAP/tasks/main.yml | 7 | ||||
-rw-r--r-- | roles/common/tasks/bacula.yml | 7 | ||||
-rw-r--r-- | roles/common/tasks/mail.yml | 7 | ||||
-rw-r--r-- | roles/common/tasks/munin-node-ssl.yml | 7 | ||||
-rw-r--r-- | roles/git/tasks/cgit.yml | 7 | ||||
-rw-r--r-- | roles/lists/tasks/nginx.yml | 7 | ||||
-rw-r--r-- | roles/webmail/tasks/roundcube.yml | 7 | ||||
-rw-r--r-- | roles/wiki/tasks/main.yml | 7 |
23 files changed, 156 insertions, 268 deletions
diff --git a/certs/public/fripost.org.pem b/certs/public/fripost.org.pem index 8c9dc63..19aff7b 100644 --- a/certs/public/fripost.org.pem +++ b/certs/public/fripost.org.pem @@ -33,30 +33,3 @@ FfFrbeRk4BKWDbe/5aHG++FX9ondyT6xQkJcr4UsIdtx0ixl3lgbBA2tlxMR2YID QBm7A3189oJ+lqTp78IDChaYGJBk3PjwG0ubBOabttAMPlfzmFzwi+Cbcd9ntFXn 8Pq4ah1p/mB+FZx3020oW4O10ky7+R8m6BS4Qnfllr0V -----END CERTIFICATE----- ------BEGIN CERTIFICATE----- -MIIEkjCCA3qgAwIBAgIQCgFBQgAAAVOFc2oLheynCDANBgkqhkiG9w0BAQsFADA/ -MSQwIgYDVQQKExtEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdCBDby4xFzAVBgNVBAMT -DkRTVCBSb290IENBIFgzMB4XDTE2MDMxNzE2NDA0NloXDTIxMDMxNzE2NDA0Nlow -SjELMAkGA1UEBhMCVVMxFjAUBgNVBAoTDUxldCdzIEVuY3J5cHQxIzAhBgNVBAMT -GkxldCdzIEVuY3J5cHQgQXV0aG9yaXR5IFgzMIIBIjANBgkqhkiG9w0BAQEFAAOC -AQ8AMIIBCgKCAQEAnNMM8FrlLke3cl03g7NoYzDq1zUmGSXhvb418XCSL7e4S0EF -q6meNQhY7LEqxGiHC6PjdeTm86dicbp5gWAf15Gan/PQeGdxyGkOlZHP/uaZ6WA8 -SMx+yk13EiSdRxta67nsHjcAHJyse6cF6s5K671B5TaYucv9bTyWaN8jKkKQDIZ0 -Z8h/pZq4UmEUEz9l6YKHy9v6Dlb2honzhT+Xhq+w3Brvaw2VFn3EK6BlspkENnWA -a6xK8xuQSXgvopZPKiAlKQTGdMDQMc2PMTiVFrqoM7hD8bEfwzB/onkxEz0tNvjj -/PIzark5McWvxI0NHWQWM6r6hCm21AvA2H3DkwIDAQABo4IBfTCCAXkwEgYDVR0T -AQH/BAgwBgEB/wIBADAOBgNVHQ8BAf8EBAMCAYYwfwYIKwYBBQUHAQEEczBxMDIG -CCsGAQUFBzABhiZodHRwOi8vaXNyZy50cnVzdGlkLm9jc3AuaWRlbnRydXN0LmNv -bTA7BggrBgEFBQcwAoYvaHR0cDovL2FwcHMuaWRlbnRydXN0LmNvbS9yb290cy9k -c3Ryb290Y2F4My5wN2MwHwYDVR0jBBgwFoAUxKexpHsscfrb4UuQdf/EFWCFiRAw -VAYDVR0gBE0wSzAIBgZngQwBAgEwPwYLKwYBBAGC3xMBAQEwMDAuBggrBgEFBQcC -ARYiaHR0cDovL2Nwcy5yb290LXgxLmxldHNlbmNyeXB0Lm9yZzA8BgNVHR8ENTAz -MDGgL6AthitodHRwOi8vY3JsLmlkZW50cnVzdC5jb20vRFNUUk9PVENBWDNDUkwu -Y3JsMB0GA1UdDgQWBBSoSmpjBH3duubRObemRWXv86jsoTANBgkqhkiG9w0BAQsF -AAOCAQEA3TPXEfNjWDjdGBX7CVW+dla5cEilaUcne8IkCJLxWh9KEik3JHRRHGJo -uM2VcGfl96S8TihRzZvoroed6ti6WqEBmtzw3Wodatg+VyOeph4EYpr/1wXKtx8/ -wApIvJSwtmVi4MFU5aMqrSDE6ea73Mj2tcMyo5jMd6jmeWUHK8so/joWUoHOUgwu -X4Po1QYz+3dszkDqMp4fklxBwXRsW10KXzPMTZ+sOPAveyxindmjkW8lGy+QsRlG -PfZ+G6Z6h7mjem0Y+iWlkYcV4PIWL1iwBi8saCbGS5jN2p8M+X+Q7UNKEkROb3N6 -KOqkqm57TH2H3eDJAkSnh6/DNFu0Qg== ------END CERTIFICATE----- diff --git a/certs/public/git.fripost.org.pem b/certs/public/git.fripost.org.pem index 13542d7..b586a50 100644 --- a/certs/public/git.fripost.org.pem +++ b/certs/public/git.fripost.org.pem @@ -33,30 +33,3 @@ wwHDDkrcpLxnDN5IRwGI6YCHnyOAqVJuYVuBhd5QPe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oAUxKexpHsscfrb4UuQdf/EFWCFiRAw -VAYDVR0gBE0wSzAIBgZngQwBAgEwPwYLKwYBBAGC3xMBAQEwMDAuBggrBgEFBQcC -ARYiaHR0cDovL2Nwcy5yb290LXgxLmxldHNlbmNyeXB0Lm9yZzA8BgNVHR8ENTAz -MDGgL6AthitodHRwOi8vY3JsLmlkZW50cnVzdC5jb20vRFNUUk9PVENBWDNDUkwu -Y3JsMB0GA1UdDgQWBBSoSmpjBH3duubRObemRWXv86jsoTANBgkqhkiG9w0BAQsF -AAOCAQEA3TPXEfNjWDjdGBX7CVW+dla5cEilaUcne8IkCJLxWh9KEik3JHRRHGJo -uM2VcGfl96S8TihRzZvoroed6ti6WqEBmtzw3Wodatg+VyOeph4EYpr/1wXKtx8/ -wApIvJSwtmVi4MFU5aMqrSDE6ea73Mj2tcMyo5jMd6jmeWUHK8so/joWUoHOUgwu -X4Po1QYz+3dszkDqMp4fklxBwXRsW10KXzPMTZ+sOPAveyxindmjkW8lGy+QsRlG -PfZ+G6Z6h7mjem0Y+iWlkYcV4PIWL1iwBi8saCbGS5jN2p8M+X+Q7UNKEkROb3N6 -KOqkqm57TH2H3eDJAkSnh6/DNFu0Qg== ------END CERTIFICATE----- diff --git a/certs/public/imap.fripost.org.pem b/certs/public/imap.fripost.org.pem index a0c63f7..77f5140 100644 --- a/certs/public/imap.fripost.org.pem +++ b/certs/public/imap.fripost.org.pem @@ -33,30 +33,3 @@ eY6cKApofYNjpPVPBiXOdGSPKFsoSXP7Dpy0l8IPnNhLDRipDa+asNySxRUt2V0U D266Y3UpA5Gl1Wd4OB9HLYFOFBNriwYvdhlX/DgO3BckI0V/YNfMCEVmzmWU+lZ2 fBcApGPdo8VVGtwCUWVfY8YkJt5HA5hPo8xP -----END CERTIFICATE----- ------BEGIN CERTIFICATE----- -MIIEkjCCA3qgAwIBAgIQCgFBQgAAAVOFc2oLheynCDANBgkqhkiG9w0BAQsFADA/ -MSQwIgYDVQQKExtEaWdpdGFsIFNpZ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-Y3JsMB0GA1UdDgQWBBSoSmpjBH3duubRObemRWXv86jsoTANBgkqhkiG9w0BAQsF -AAOCAQEA3TPXEfNjWDjdGBX7CVW+dla5cEilaUcne8IkCJLxWh9KEik3JHRRHGJo -uM2VcGfl96S8TihRzZvoroed6ti6WqEBmtzw3Wodatg+VyOeph4EYpr/1wXKtx8/ -wApIvJSwtmVi4MFU5aMqrSDE6ea73Mj2tcMyo5jMd6jmeWUHK8so/joWUoHOUgwu -X4Po1QYz+3dszkDqMp4fklxBwXRsW10KXzPMTZ+sOPAveyxindmjkW8lGy+QsRlG -PfZ+G6Z6h7mjem0Y+iWlkYcV4PIWL1iwBi8saCbGS5jN2p8M+X+Q7UNKEkROb3N6 -KOqkqm57TH2H3eDJAkSnh6/DNFu0Qg== ------END CERTIFICATE----- diff --git a/certs/public/lists.fripost.org.pem b/certs/public/lists.fripost.org.pem index 3c5eca8..6739ee5 100644 --- a/certs/public/lists.fripost.org.pem +++ b/certs/public/lists.fripost.org.pem @@ -33,30 +33,3 @@ o1nVroyY7APd/ac/qwR7fr/4WmN6VzPH00e6c0i9sU2Ndgy7n686BEtF1utAShqX DXqaJUzHyL7HqV9VSZCh+UYgDm7OOKzgGMelhcj3x6FMjXSduBCp7M5iUmAUuZuO M7IKcUm7RqayAA== -----END CERTIFICATE----- ------BEGIN CERTIFICATE----- -MIIEqDCCA5CgAwIBAgIRAJgT9HUT5XULQ+dDHpceRL0wDQYJKoZIhvcNAQELBQAw -PzEkMCIGA1UEChMbRGlnaXRhbCBTaWduYXR1cmUgVHJ1c3QgQ28uMRcwFQYDVQQD -Ew5EU1QgUm9vdCBDQSBYMzAeFw0xNTEwMTkyMjMzMzZaFw0yMDEwMTkyMjMzMzZa -MEoxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1MZXQncyBFbmNyeXB0MSMwIQYDVQQD -ExpMZXQncyBFbmNyeXB0IEF1dGhvcml0eSBYMTCCASIwDQYJKoZIhvcNAQEBBQAD -ggEPADCCAQo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rJZTC9zK1uIfW6t5dHQjuOWv+HHoW -ZnupyxpsEUlEaFb+/SCI4KCSBdAsYxAcsHYI5xxEI4LutHp6s3OT2FuO90WfdsIk -6q78OMSdn875bNjdBYAqxUp2/LEIHfDBkLoQz0hFJmwAbYahqKaLn73PAAm1X2kj -f1w8DdnkabOLGeOVcj9LQ+s67vBykx4anTjURkbqZslUEUsn2k5xeua2zUk= ------END CERTIFICATE----- diff --git a/certs/public/mail.fripost.org.pem b/certs/public/mail.fripost.org.pem index 19079ec..6666353 100644 --- a/certs/public/mail.fripost.org.pem +++ b/certs/public/mail.fripost.org.pem @@ -33,30 +33,3 @@ qo9wQ1N2jCQThbubZ24VPSMLOEK0X42brgxjVG7mnomTcCuve9ta8Omr7i0o9lta mn/9iJSxs/w76qMyvDcupGHsS6aGow7DQ72xybFrec4paUuzL5JVtSuMOr9Equyl ZKhT4MwPjvH9QUZkbz3fxoVBY5T8jHAqTr/Ivfo= -----END CERTIFICATE----- ------BEGIN CERTIFICATE----- -MIIEkjCCA3qgAwIBAgIQCgFBQgAAAVOFc2oLheynCDANBgkqhkiG9w0BAQsFADA/ -MSQwIgYDVQQKExtEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdCBDby4xFzAVBgNVBAMT -DkRTVCBSb290IENBIFgzMB4XDTE2MDMxNzE2NDA0NloXDTIxMDMxNzE2NDA0Nlow -SjELMAkGA1UEBhMCVVMxFjAUBgNVBAoTDUxldCdzIEVuY3J5cHQxIzAhBgNVBAMT -GkxldCdzIEVuY3J5cHQgQXV0aG9yaXR5IFgzMIIBIjANBgkqhkiG9w0BAQEFAAOC -AQ8AMIIBCgKCAQEAnNMM8FrlLke3cl03g7NoYzDq1zUmGSXhvb418XCSL7e4S0EF -q6meNQhY7LEqxGiHC6PjdeTm86dicbp5gWAf15Gan/PQeGdxyGkOlZHP/uaZ6WA8 -SMx+yk13EiSdRxta67nsHjcAHJyse6cF6s5K671B5TaYucv9bTyWaN8jKkKQDIZ0 -Z8h/pZq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- diff --git a/certs/public/mx1.fripost.org.pem b/certs/public/mx1.fripost.org.pem index eeb7781..80d5cdc 100644 --- a/certs/public/mx1.fripost.org.pem +++ b/certs/public/mx1.fripost.org.pem @@ -33,30 +33,3 @@ PQUkcXFW/JQQqiSbi44N8F5s4Xu5tvGqpq7jb8F0u4cg3anYse5usb6oSDerOSJ8 0uet5hDxxvCa7xnxwdL8/zly5sD/ZKX4qL15MOW41ppl+0ghDMYi4xOzBkcldrGp YbiG4vA7 -----END CERTIFICATE----- ------BEGIN CERTIFICATE----- -MIIEkjCCA3qgAwIBAgIQCgFBQgAAAVOFc2oLheynCDANBgkqhkiG9w0BAQsFADA/ -MSQwIgYDVQQKExtEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdCBDby4xFzAVBgNVBAMT -DkRTVCBSb290IENBIFgzMB4XDTE2MDMxNzE2NDA0NloXDTIxMDMxNzE2NDA0Nlow -SjELMAkGA1UEBhMCVVMxFjAUBgNVBAoTDUxldCdzIEVuY3J5cHQxIzAhBgNVBAMT -GkxldCdzIEVuY3J5cHQgQXV0aG9yaXR5IFgzMIIBIjANBgkqhkiG9w0BAQEFAAOC -AQ8AMIIBCgKCAQEAnNMM8FrlLke3cl03g7NoYzDq1zUmGSXhvb418XCSL7e4S0EF -q6meNQhY7LEqxGiHC6PjdeTm86dicbp5gWAf15Gan/PQeGdxyGkOlZHP/uaZ6WA8 -SMx+yk13EiSdRxta67nsHjcAHJyse6cF6s5K671B5TaYucv9bTyWaN8jKkKQDIZ0 -Z8h/pZq4UmEUEz9l6YKHy9v6Dlb2honzhT+Xhq+w3Brvaw2VFn3EK6BlspkENnWA -a6xK8xuQSXgvopZPKiAlKQTGdMDQMc2PMTiVFrqoM7hD8bEfwzB/onkxEz0tNvjj -/PIzark5McWvxI0NHWQWM6r6hCm21AvA2H3DkwIDAQABo4IBfTCCAXkwEgYDVR0T -AQH/BAgwBgEB/wIBADAOBgNVHQ8BAf8EBAMCAYYwfwYIKwYBBQUHAQEEczBxMDIG -CCsGAQUFBzABhiZodHRwOi8vaXNyZy50cnVzdGlkLm9jc3AuaWRlbnRydXN0LmNv -bTA7BggrBgEFBQcwAoYvaHR0cDovL2FwcHMuaWRlbnRydXN0LmNvbS9yb290cy9k -c3Ryb290Y2F4My5wN2MwHwYDVR0jBBgwFoAUxKexpHsscfrb4UuQdf/EFWCFiRAw -VAYDVR0gBE0wSzAIBgZngQwBAgEwPwYLKwYBBAGC3xMBAQEwMDAuBggrBgEFBQcC -ARYiaHR0cDovL2Nwcy5yb290LXgxLmxldHNlbmNyeXB0Lm9yZzA8BgNVHR8ENTAz -MDGgL6AthitodHRwOi8vY3JsLmlkZW50cnVzdC5jb20vRFNUUk9PVENBWDNDUkwu -Y3JsMB0GA1UdDgQWBBSoSmpjBH3duubRObemRWXv86jsoTANBgkqhkiG9w0BAQsF -AAOCAQEA3TPXEfNjWDjdGBX7CVW+dla5cEilaUcne8IkCJLxWh9KEik3JHRRHGJo -uM2VcGfl96S8TihRzZvoroed6ti6WqEBmtzw3Wodatg+VyOeph4EYpr/1wXKtx8/ -wApIvJSwtmVi4MFU5aMqrSDE6ea73Mj2tcMyo5jMd6jmeWUHK8so/joWUoHOUgwu -X4Po1QYz+3dszkDqMp4fklxBwXRsW10KXzPMTZ+sOPAveyxindmjkW8lGy+QsRlG -PfZ+G6Z6h7mjem0Y+iWlkYcV4PIWL1iwBi8saCbGS5jN2p8M+X+Q7UNKEkROb3N6 -KOqkqm57TH2H3eDJAkSnh6/DNFu0Qg== ------END CERTIFICATE----- diff --git a/certs/public/mx2.fripost.org.pem b/certs/public/mx2.fripost.org.pem index 8b88d67..67a569d 100644 --- a/certs/public/mx2.fripost.org.pem +++ b/certs/public/mx2.fripost.org.pem @@ -33,30 +33,3 @@ N6yPhW08XvqYlrKkmehzAKx9nF8LuPIPuDvjcaC83LwTC7gn9MHs5f6idKI2Brci D96X8Bygv1/ngAxEWufL8pLgOM5zczVPGKeQj9r41zIGT1YkU5cycCB92LndFy7O 8CH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FBQcC -ARYiaHR0cDovL2Nwcy5yb290LXgxLmxldHNlbmNyeXB0Lm9yZzA8BgNVHR8ENTAz -MDGgL6AthitodHRwOi8vY3JsLmlkZW50cnVzdC5jb20vRFNUUk9PVENBWDNDUkwu -Y3JsMB0GA1UdDgQWBBSoSmpjBH3duubRObemRWXv86jsoTANBgkqhkiG9w0BAQsF -AAOCAQEA3TPXEfNjWDjdGBX7CVW+dla5cEilaUcne8IkCJLxWh9KEik3JHRRHGJo -uM2VcGfl96S8TihRzZvoroed6ti6WqEBmtzw3Wodatg+VyOeph4EYpr/1wXKtx8/ -wApIvJSwtmVi4MFU5aMqrSDE6ea73Mj2tcMyo5jMd6jmeWUHK8so/joWUoHOUgwu -X4Po1QYz+3dszkDqMp4fklxBwXRsW10KXzPMTZ+sOPAveyxindmjkW8lGy+QsRlG -PfZ+G6Z6h7mjem0Y+iWlkYcV4PIWL1iwBi8saCbGS5jN2p8M+X+Q7UNKEkROb3N6 -KOqkqm57TH2H3eDJAkSnh6/DNFu0Qg== ------END CERTIFICATE----- diff --git a/certs/public/smtp.fripost.org.pem b/certs/public/smtp.fripost.org.pem index d8eba45..918da83 100644 --- a/certs/public/smtp.fripost.org.pem +++ b/certs/public/smtp.fripost.org.pem @@ -33,30 +33,3 @@ vddeDuHYLqKMmsNGXrKJj4J7PY6A8UURWs/2N6ax2Xibfo7Haw62aYw68Xz+VKQP CTa3qQCrOXsqYRbAWEmwIBdhrE42HQdoYDTtcTAX/s+qCmWwA2n2wH7nn2Di3CJH 5X4GTyu3ta4= -----END CERTIFICATE----- ------BEGIN CERTIFICATE----- -MIIEkjCCA3qgAwIBAgIQCgFBQgAAAVOFc2oLheynCDANBgkqhkiG9w0BAQsFADA/ -MSQwIgYDVQQKExtEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdCBDby4xFzAVBgNVBAMT -DkRTVCBSb290IENBIFgzMB4XDTE2MDMxNzE2NDA0NloXDTIxMDMxNzE2NDA0Nlow -SjELMAkGA1UEBh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9KEik3JHRRHGJo -uM2VcGfl96S8TihRzZvoroed6ti6WqEBmtzw3Wodatg+VyOeph4EYpr/1wXKtx8/ -wApIvJSwtmVi4MFU5aMqrSDE6ea73Mj2tcMyo5jMd6jmeWUHK8so/joWUoHOUgwu -X4Po1QYz+3dszkDqMp4fklxBwXRsW10KXzPMTZ+sOPAveyxindmjkW8lGy+QsRlG -PfZ+G6Z6h7mjem0Y+iWlkYcV4PIWL1iwBi8saCbGS5jN2p8M+X+Q7UNKEkROb3N6 -KOqkqm57TH2H3eDJAkSnh6/DNFu0Qg== ------END CERTIFICATE----- diff --git a/lib/action_plugins/fetch_cmd.py b/lib/action_plugins/fetch_cmd.py new file mode 100644 index 0000000..99bdf2e --- /dev/null +++ b/lib/action_plugins/fetch_cmd.py @@ -0,0 +1,61 @@ +# Fetch the output of a remote command +# Copyright (c) 2016 Guilhem Moulin <guilhem@fripost.org> +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +import subprocess, os +from ansible.plugins.action import ActionBase +from ansible.utils.path import makedirs_safe +from ansible.utils.hashing import checksum + +class ActionModule(ActionBase): + TRANSFERS_FILES = True + + def run(self, tmp=None, task_vars=None): + if task_vars is None: + task_vars = dict() + + if self._play_context.check_mode: + return dict(skipped=True, msg='check mode not supported for this module') + + result = super(ActionModule, self).run(tmp, task_vars) + + cmd = self._task.args.get('cmd', None) + stdin = self._task.args.get('stdin', None) + dest = self._task.args.get('dest', None) + + if cmd is None or dest is None: + return dict(failed=True, msg="cmd and dest are required") + + if stdin is not None: + stdin = self._connection._shell.join_path(stdin) + stdin = self._remote_expand_user(stdin) + + stdout = self._connection._shell.join_path(self._make_tmp_path(), 'stdout') + result.update(self._execute_module(module_args=dict(cmd=cmd, stdin=stdin, dest=stdout), task_vars=task_vars)) + + # calculate checksum for the local file + local_checksum = checksum(dest) + + # calculate checksum for the remote file, don't bother if using become as slurp will be used + remote_checksum = self._remote_checksum(stdout, all_vars=task_vars) + + if remote_checksum != local_checksum: + makedirs_safe(os.path.dirname(dest)) + self._connection.fetch_file(stdout, dest) + if checksum(dest) == remote_checksum: + result.update(dict(changed=True)) + else: + result.update(dict(failed=True)) + return result diff --git a/lib/modules/fetch_cmd.py b/lib/modules/fetch_cmd.py new file mode 100644 index 0000000..ac8757f --- /dev/null +++ b/lib/modules/fetch_cmd.py @@ -0,0 +1,56 @@ +#!/usr/bin/python + +# Fetch the output of a remote command +# Copyright (c) 2016 Guilhem Moulin <guilhem@fripost.org> +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + + +# import module snippets +from ansible.module_utils.basic import * + +def main(): + module = AnsibleModule( + argument_spec = dict( + cmd = dict( default=None ), + stdin = dict( default=None ), + dest = dict( default=None ), + ), + supports_check_mode=False + ) + + params = module.params + cmd = params['cmd'] + stdin = params['stdin'] + dest = params['dest'] + + if cmd is None or dest is None: + return dict(failed=True, msg="cmd and dest are required") + + changed = False + try: + if stdin is not None: + stdin = open(stdin, 'r') + + with open(dest, 'w') as stdout: + subprocess.check_call(cmd.split(), stdin=stdin, stdout=stdout) + if stdin is not None: + stdin.close() + + except KeyError, e: + module.fail_json(msg=str(e)) + + module.exit_json(changed=changed) + +main() diff --git a/roles/IMAP/tasks/imap.yml b/roles/IMAP/tasks/imap.yml index 883b6a8..39dc573 100644 --- a/roles/IMAP/tasks/imap.yml +++ b/roles/IMAP/tasks/imap.yml @@ -80,10 +80,9 @@ - name: Fetch Dovecot's X.509 certificate # Ensure we don't fetch private data become: False - fetch: src=/etc/dovecot/ssl/imap.fripost.org.pem - dest=certs/public/ - fail_on_missing=yes - flat=yes + fetch_cmd: cmd="openssl x509" + stdin=/etc/dovecot/ssl/imap.fripost.org.pem + dest=certs/public/imap.fripost.org.pem tags: - genkey diff --git a/roles/MSA/tasks/main.yml b/roles/MSA/tasks/main.yml index 4c0ceef..d9a3d47 100644 --- a/roles/MSA/tasks/main.yml +++ b/roles/MSA/tasks/main.yml @@ -28,10 +28,9 @@ # Ensure we don't fetch private data become: False # `/usr/sbin/postmulti -i msa -x /usr/sbin/postconf -xh smtpd_tls_cert_file` - fetch: src=/etc/postfix/ssl/smtp.fripost.org.pem - dest=certs/public/ - fail_on_missing=yes - flat=yes + fetch_cmd: cmd="openssl x509" + stdin=/etc/postfix/ssl/smtp.fripost.org.pem + dest=certs/public/smtp.fripost.org.pem tags: - genkey diff --git a/roles/MX/tasks/main.yml b/roles/MX/tasks/main.yml index 6ca11c0..62ffa02 100644 --- a/roles/MX/tasks/main.yml +++ b/roles/MX/tasks/main.yml @@ -82,10 +82,9 @@ # Ensure we don't fetch private data become: False # `/usr/sbin/postmulti -i mx -x /usr/sbin/postconf -xh smtpd_tls_cert_file` - fetch: src=/etc/postfix/ssl/mx.fripost.org.pem - dest=certs/public/mx{{ mxno | default('') }}.fripost.org.pem - fail_on_missing=yes - flat=yes + fetch_cmd: cmd="openssl x509" + stdin=/etc/postfix/ssl/mx.fripost.org.pem + dest=certs/public/mx{{ mxno | default('') }}.fripost.org.pem tags: - genkey diff --git a/roles/bacula-dir/tasks/main.yml b/roles/bacula-dir/tasks/main.yml index 6799900..8d182d2 100644 --- a/roles/bacula-dir/tasks/main.yml +++ b/roles/bacula-dir/tasks/main.yml @@ -21,10 +21,9 @@ - name: Fetch Bacula Dir X.509 certificate # Ensure we don't fetch private data become: False - fetch: src=/etc/stunnel/certs/{{ inventory_hostname_short }}-dir.pem - dest=certs/bacula/ - fail_on_missing=yes - flat=yes + fetch_cmd: cmd="openssl x509" + stdin=/etc/stunnel/certs/{{ inventory_hostname_short }}-dir.pem + dest=certs/bacula/{{ inventory_hostname_short }}-dir.pem tags: - genkey diff --git a/roles/bacula-sd/tasks/main.yml b/roles/bacula-sd/tasks/main.yml index 5de0d3d..795804f 100644 --- a/roles/bacula-sd/tasks/main.yml +++ b/roles/bacula-sd/tasks/main.yml @@ -21,10 +21,9 @@ - name: Fetch Bacula SD X.509 certificate # Ensure we don't fetch private data become: False - fetch: src=/etc/stunnel/certs/{{ inventory_hostname_short }}-sd.pem - dest=certs/bacula/ - fail_on_missing=yes - flat=yes + fetch_cmd: cmd="openssl x509" + stdin=/etc/stunnel/certs/{{ inventory_hostname_short }}-sd.pem + dest=certs/bacula/{{ inventory_hostname_short }}-sd.pem tags: - genkey diff --git a/roles/common-LDAP/tasks/main.yml b/roles/common-LDAP/tasks/main.yml index 960189b..6ad561e 100644 --- a/roles/common-LDAP/tasks/main.yml +++ b/roles/common-LDAP/tasks/main.yml @@ -57,10 +57,9 @@ - name: Fetch slapd's X.509 certificate # Ensure we don't fetch private data become: False - fetch: src=/etc/ldap/ssl/{{ item.name }}.pem - dest=certs/ldap/ - fail_on_missing=yes - flat=yes + fetch_cmd: cmd="openssl x509" + stdin=/etc/ldap/ssl/{{ item.name }}.pem + dest=certs/ldap/{{ item.name }}.pem with_items: - { group: 'LDAP-provider', name: ldap.fripost.org } - { group: 'MX', name: mx } diff --git a/roles/common/tasks/bacula.yml b/roles/common/tasks/bacula.yml index f0919e4..1bd2b77 100644 --- a/roles/common/tasks/bacula.yml +++ b/roles/common/tasks/bacula.yml @@ -21,10 +21,9 @@ - name: Fetch Bacula FD X.509 certificate # Ensure we don't fetch private data become: False - fetch: src=/etc/stunnel/certs/{{ inventory_hostname_short }}-fd.pem - dest=certs/bacula/ - fail_on_missing=yes - flat=yes + fetch_cmd: cmd="openssl x509" + stdin=/etc/stunnel/certs/{{ inventory_hostname_short }}-fd.pem + dest=certs/bacula/{{ inventory_hostname_short }}-fd.pem tags: - genkey diff --git a/roles/common/tasks/mail.yml b/roles/common/tasks/mail.yml index cd3020b..1533893 100644 --- a/roles/common/tasks/mail.yml +++ b/roles/common/tasks/mail.yml @@ -69,10 +69,9 @@ - name: Fetch Postfix's X.509 certificate # Ensure we don't fetch private data become: False - fetch: src=/etc/postfix/ssl/{{ ansible_fqdn }}.pem - dest=certs/postfix/ - fail_on_missing=yes - flat=yes + fetch_cmd: cmd="openssl x509" + stdin=/etc/postfix/ssl/{{ ansible_fqdn }}.pem + dest=certs/postfix/{{ ansible_fqdn }}.pem tags: - genkey diff --git a/roles/common/tasks/munin-node-ssl.yml b/roles/common/tasks/munin-node-ssl.yml index 59ed7d7..e0b1d8c 100644 --- a/roles/common/tasks/munin-node-ssl.yml +++ b/roles/common/tasks/munin-node-ssl.yml @@ -21,10 +21,9 @@ - name: Fetch Munin X.509 certificate # Ensure we don't fetch private data become: False - fetch: src=/etc/stunnel/certs/munin-{{ inventory_hostname_short }}.pem - dest=certs/munin/{{ inventory_hostname }}.pem - fail_on_missing=yes - flat=yes + fetch_cmd: cmd="openssl x509" + stdin=/etc/stunnel/certs/munin-{{ inventory_hostname_short }}.pem + dest=certs/munin/{{ inventory_hostname }}.pem tags: - genkey diff --git a/roles/git/tasks/cgit.yml b/roles/git/tasks/cgit.yml index df11872..532ca10 100644 --- a/roles/git/tasks/cgit.yml +++ b/roles/git/tasks/cgit.yml @@ -105,9 +105,8 @@ - name: Fetch Nginx's X.509 certificate # Ensure we don't fetch private data become: False - fetch: src=/etc/nginx/ssl/git.fripost.org.pem - dest=certs/public/ - fail_on_missing=yes - flat=yes + fetch_cmd: cmd="openssl x509" + stdin=/etc/nginx/ssl/git.fripost.org.pem + dest=certs/public/git.fripost.org.pem tags: - genkey diff --git a/roles/lists/tasks/nginx.yml b/roles/lists/tasks/nginx.yml index 34d42bd..caa1abf 100644 --- a/roles/lists/tasks/nginx.yml +++ b/roles/lists/tasks/nginx.yml @@ -28,9 +28,8 @@ - name: Fetch Nginx's X.509 certificate # Ensure we don't fetch private data become: False - fetch: src=/etc/nginx/ssl/lists.fripost.org.pem - dest=certs/public/ - fail_on_missing=yes - flat=yes + fetch_cmd: cmd="openssl x509" + stdin=/etc/nginx/ssl/lists.fripost.org.pem + dest=certs/public/lists.fripost.org.pem tags: - genkey diff --git a/roles/webmail/tasks/roundcube.yml b/roles/webmail/tasks/roundcube.yml index e416656..ab417e5 100644 --- a/roles/webmail/tasks/roundcube.yml +++ b/roles/webmail/tasks/roundcube.yml @@ -136,9 +136,8 @@ - name: Fetch Nginx's X.509 certificate # Ensure we don't fetch private data become: False - fetch: src=/etc/nginx/ssl/mail.fripost.org.pem - dest=certs/public/ - fail_on_missing=yes - flat=yes + fetch_cmd: cmd="openssl x509" + stdin=/etc/nginx/ssl/mail.fripost.org.pem + dest=certs/public/mail.fripost.org.pem tags: - genkey diff --git a/roles/wiki/tasks/main.yml b/roles/wiki/tasks/main.yml index 9748768..3c7ac6f 100644 --- a/roles/wiki/tasks/main.yml +++ b/roles/wiki/tasks/main.yml @@ -98,10 +98,9 @@ - name: Fetch Nginx's X.509 certificate # Ensure we don't fetch private data become: False - fetch: src=/etc/nginx/ssl/www.fripost.org.pem - dest=certs/public/fripost.org.pem - fail_on_missing=yes - flat=yes + fetch_cmd: cmd="openssl x509" + stdin=/etc/nginx/ssl/www.fripost.org.pem + dest=certs/public/fripost.org.pem tags: - genkey |