Ansible role to manage Nodepool
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

pre.yaml 1.0KB

123456789101112131415161718192021222324252627282930313233
  1. # Copyright 2016 Red Hat, Inc.
  2. #
  3. # Licensed under the Apache License, Version 2.0 (the "License");
  4. # you may not use this file except in compliance with the License.
  5. # You may obtain a copy of the License at
  6. #
  7. # http://www.apache.org/licenses/LICENSE-2.0
  8. #
  9. # Unless required by applicable law or agreed to in writing, software
  10. # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  11. # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  12. # License for the specific language governing permissions and limitations
  13. # under the License.
  14. ---
  15. - name: Create group account
  16. become: true
  17. group:
  18. name: "{{ nodepool_user_group }}"
  19. - name: Create user account
  20. become: true
  21. user:
  22. createhome: true
  23. group: "{{ nodepool_user_group }}"
  24. home: "{{ nodepool_user_home }}"
  25. name: "{{ nodepool_user_name }}"
  26. shell: "{{ nodepool_user_shell|default(omit) }}"
  27. - name: Set permissions on home directory
  28. become: true
  29. file:
  30. path: "{{ nodepool_user_home }}"
  31. mode: "{{ nodepool_user_home_mode }}"