Guest User

Untitled

a guest
Jan 22nd, 2018
306
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. - name: Add credential to add node
  2. uri:
  3. body: |
  4. json={
  5. "": "0",
  6. "credentials": {
  7. "scope": "GLOBAL",
  8. "id": "jenkins_linux_slave1_auth",
  9. "username": "jenkins",
  10. "password": "123456",
  11. "privateKeySource": {
  12. "stapler-class": "com.cloudbees.jenkins.plugins.sshcredentials.impl.BasicSSHUserPrivateKey$DirectEntryPrivateKeySource",
  13. "privateKey": "-----BEGIN RSA PRIVATE KEY-----nProc-Type: 4,ENCRYPTEDnPRIVATE+KEY+WITH+PLUS+SIGNn-----END RSA PRIVATE KEY-----"
  14. },
  15. "description": "Jenkins Linux Slave1 Authentication",
  16. "stapler-class": "com.cloudbees.jenkins.plugins.sshcredentials.impl.BasicSSHUserPrivateKey"
  17. }
  18. }
  19. force_basic_auth: yes
  20. method: POST
  21. password: "{{ jenkins_user_token }}"
  22. status_code: 302
  23. url: "{{ jenkins_url }}/credentials/store/system/domain/_/createCredentials"
  24. user: "{{ jenkins_user }}"
  25. validate_certs: no
  26. tags:
  27. - credential
Add Comment
Please, Sign In to add comment