Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - name: Add credential to add node
- uri:
- body: |
- json={
- "": "0",
- "credentials": {
- "scope": "GLOBAL",
- "id": "jenkins_linux_slave1_auth",
- "username": "jenkins",
- "password": "123456",
- "privateKeySource": {
- "stapler-class": "com.cloudbees.jenkins.plugins.sshcredentials.impl.BasicSSHUserPrivateKey$DirectEntryPrivateKeySource",
- "privateKey": "-----BEGIN RSA PRIVATE KEY-----nProc-Type: 4,ENCRYPTEDnPRIVATE+KEY+WITH+PLUS+SIGNn-----END RSA PRIVATE KEY-----"
- },
- "description": "Jenkins Linux Slave1 Authentication",
- "stapler-class": "com.cloudbees.jenkins.plugins.sshcredentials.impl.BasicSSHUserPrivateKey"
- }
- }
- force_basic_auth: yes
- method: POST
- password: "{{ jenkins_user_token }}"
- status_code: 302
- url: "{{ jenkins_url }}/credentials/store/system/domain/_/createCredentials"
- user: "{{ jenkins_user }}"
- validate_certs: no
- tags:
- - credential
Add Comment
Please, Sign In to add comment