python-ansible: add crypto module for stx 5.0 76/8276/1
authorJackie Huang <jackie.huang@windriver.com>
Tue, 25 May 2021 09:12:25 +0000 (17:12 +0800)
committerJackie Huang <jackie.huang@windriver.com>
Thu, 12 May 2022 13:48:41 +0000 (21:48 +0800)
commit262f540d2dbfd79ef9c20696b1526cdc4c97cb3d
tree130cb949b0dfa275ff3a7ae9d7739760dc5ccc76
parent2ead29a1d5dacb282f8fd48215a4324418a874c7
python-ansible: add crypto module for stx 5.0

* crypto module is required for stx 5.0, or the ansible
  bootstrap failed with:

  ```
  fatal: [localhost]: FAILED! => {
      "reason": "no action detected in task. This often indicates a
      misspelled module name, or incorrect module path.\n\nThe error
      appears to be in
      '/usr/share/ansible/stx-ansible/playbooks/roles/common/create-etcd-certs/tasks/main.yml':
      line 12, column 3, but may\nbe elsewhere in the file depending
      on the exact syntax problem.\n\nThe offending line appears to
      be:\n\n\n- name: Generate private key for etcd server and
      client\n  ^ here\n"
  }
  ```

* add a patch for crypto module to allow the constraint value
  to be lower case to avoid the following issue:

  ```
  File
  "/tmp/ansible_openssl_csr_payload_OzIIJq/ansible_openssl_csr_payload.zip/ansible/module_utils/crypto.py",
  line 1821, in cryptography_get_basic_constraints
      raise OpenSSLObjectError('Unknown basic constraint value "{0}" for
      CA'.format(constraint[3:]))
  ```

Issue-ID: INF-215

Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Change-Id: I856fc8f0ba9cdcb3137de2cffe3e5d9d13765f74
meta-starlingx/meta-stx-cloud/recipes-devtools/python/files/python-ansible/python-ansible-crypto.py-allow-the-constraint-value-to-be-lower-cas.patch [new file with mode: 0644]
meta-starlingx/meta-stx-cloud/recipes-devtools/python/python-ansible_%.bbappend