File tree 2 files changed +40
-1
lines changed
satellite/roles/client-scripts/files
2 files changed +40
-1
lines changed Original file line number Diff line number Diff line change 82
82
TZ: UTC # make sure returned times are in UTC
83
83
register: reg
84
84
85
+ - name: Upload yggdrasild configuration file (if rex_mode == 'mqtt')
86
+ ansible.builtin.copy:
87
+ dest: /etc/yggdrasil/config.toml
88
+ content: |
89
+ # yggdrasil global configuration settings written by katello-pull-transport-migrate
90
+ broker = ["mqtts://{{ server }}:1883"]
91
+ cert-file = "/etc/pki/consumer/cert.pem"
92
+ key-file = "/etc/pki/consumer/key.pem"
93
+ ca-root = ["/etc/rhsm/ca/katello-server-ca.pem"]
94
+ log-level = "error"
95
+ when: "rex_mode == 'mqtt'"
96
+
97
+ - name: Restart yggdrasild service unit (if rex_mode == 'mqtt')
98
+ ansible.builtin.systemd:
99
+ name: yggdrasild
100
+ state: restarted
101
+ when: "rex_mode == 'mqtt'"
102
+
85
103
- name: "Register - output"
86
104
debug:
87
105
msg:
Original file line number Diff line number Diff line change 72
72
&> "{{ clients_yaml_cmd_log }}"
73
73
register : clients_yaml_cmd
74
74
ignore_errors : true
75
- when : " method == 'clients.yaml'"
75
+ when :
76
+ - method == 'clients.yaml'
77
+ - hostvars[groups['satellite6']|first].rex_mode is not defined or hostvars[groups['satellite6']|first].rex_mode == 'ssh'
78
+
79
+ - name : " Run clients.yaml (log = {{ clients_yaml_cmd_log }})"
80
+ shell : |
81
+ ansible-playbook \
82
+ --private-key /root/id_rsa_key \
83
+ --forks "{{ size }}" \
84
+ -i clients.ini \
85
+ -e "server={{ groups['satellite6']|first }}" \
86
+ -e "activationkey='ActivationKey'" \
87
+ -e "organization='{{ sat_orglabel }}'" \
88
+ -e "config_server_server_timeout='{{ config_server_server_timeout|default('') }}'" \
89
+ -e "rex_mode='mqtt'" \
90
+ clients.yaml \
91
+ &> "{{ clients_yaml_cmd_log }}"
92
+ register : clients_yaml_cmd
93
+ ignore_errors : true
94
+ when :
95
+ - method == 'clients.yaml'
96
+ - hostvars[groups['satellite6']|first].rex_mode is defined and hostvars[groups['satellite6']|first].rex_mode == 'mqtt'
76
97
77
98
- name : " Run clients-register.yaml (log = {{ clients_yaml_cmd_log }})"
78
99
shell : |
You can’t perform that action at this time.
0 commit comments